Code Definition and 908 Threads

  1. R

    How can Yee's algorithm and PML ABCs be used to detect breast cancer?

    Hi everyone, new to the forum and new to fortran. my coding skills have never been my strongest point and I'm struggling to understand the code from start to finish. If anybody can help me, i would appreciate it very much. Basically the code is used to detect breast cancer using the Yee's...
  2. Square1

    Software Code Examples: Where to Find Them

    Hi. Does anyone know of any places where I can get the code of some notable notable software, or parts of it, even if it's old? Or is this totally unlikely.
  3. E

    LC-3 Assembly Code Error detection

    Homework Statement What is wrong with the code fragment: .ORIG x3000 AND R0,R0, #0 AND R2,R2, #0 ADD R2,R2, #7 JSR SUB ADD R2,R2, ASCII ADD R0,R2,#0 TRAP x21 SUB ADD R2,R2,#9 ADD R7,R7,#1 RET ASCII .FILL x0030 .END The Attempt at a Solution Ok, so first we ckear some...
  4. S

    Fortran Fortran: all lines of the code are not being read

    hello, i'm a beginner in programming. i wrote a program to calculate velocity correlation function. i do not get any compilation errors but the lines after line number 42 are not being read. could someone tell me what is it that I'm doing wrong? thanks a lot! svartak !program to...
  5. N

    The code work in windows system but does not work in linux

    It looks like dead loop when it is running on linux system. It works perfectly in windows. #include <stdio.h> #include <stdlib.h> #include <math.h> #define NF 10 //total number of data. /* function prototypes */ double gaussian( void ); int main() { int i; double...
  6. N

    Testing RAM on Board using Machine Assembly Code

    I'm currently taking a Microprocessor course and we are adding to our breadboard week by week. The most recent add on was a UT6264CPCL RAM chip. Other chip specifications are given below in in 2. Homework Equations . My question is, how do we test to make sure that the RAM is working using two...
  7. D

    Help with errors in my BinaryTree code

    Mod note: I added [ code ] and [ /code ] tags.[/color] Homework Statement I am having touble with errors in this code and honestly I have nothing on why it does not work so if anyone can help it will be much appreciated! The errors are in the BinaryTree class I will bold the mistakes in the...
  8. M

    Probability distribution pin code guessing

    Homework Statement What is the distribution of stochastic variable X = "the number of attempts needed to find the correct last digit of a pin code" Homework Equations The Attempt at a Solution I thought it was like this: P(X=1) = 1/10 P(X=2) = 9/10*1/9 P(X=3) = 9/10*8/9*1/7...
  9. I

    Code for 2 dimesional Newtons method.

    Hey, I'm trying to figure out how to do Newtons method in 2 dimensions. That is, I want it to take in an input of my initial matrix {x0,y0} and then follow the algorithm to find the solution to f1(x,y)=0, f2(x,y)=0. The algorithm is {x1,y1}={x0,y0}-A^-1*F{x0,y0} where A is the matrix of mixed...
  10. MacLaddy

    LaTeX Is there a way to practice Latex code without posting on forums?

    I have noticed recently that I will struggle with a math problem for hours, sometimes days, and then within five minutes of posting I will realize my error and resolve it myself. I think it has something to do with the crafting of the Latex code, previewing, repairing, previewing again, changing...
  11. D

    MATLAB Altering Matlab Code for a Logistic Map Cobweb Plot

    I found some Matlab code that works. However, I am not sure how to alter it for my needs. How can I make the code work for this:##N_{t+1} = \frac{(1+r)N_t}{1+rN_t}##What needs to be changed? %%% MAKES A COBWEB PLOT FOR A LOGISTIC MAP % compute trajectory a=3.0; % parameter x0=0.2...
  12. F

    What is wrong with this matlab code?

    Write a user-defined MATLAB function for the following math function: y(t) = -0.2x^4 + e^(-0.5x)*x^3+7x^2 The input to the function is x and the output is y. Write the function such that x can be a vector Use this function to make a plot of the function y(x) -3≤x≤4 function y=chp7one(x)...
  13. P

    Fortran Why is My Fortran Code Not Working?

    I'm new in programing. Does enybody knows why this don't work. implicit none integer i,N,Ntot,istag real*8 t,U,tpin,k,eg,mstag real*8 rho,Umstag,Urho real*8 eaf,eaftot,lambdaminus write(6,*) 'N,Ntot,t,U' read (5,*) N,Ntot,t,U write(36,*) Ntot/2+1 tpin=8.d0*datan(1.do)/dfloat(N)...
  14. M

    Strange indexing in Fortran Code

    Hi all, I am totally new to fortran. I have to convert a code that is actually written in the fortran to matlab. There is only one subroutine that is totally mysterious for me. I am posting the part of code I have problem with, below: 1. subroutine...
  15. W

    Freedom or aligators use switches for code.

    I was wondering if anyone had seen this logic problem in a different form or knows how a solution to this. Thanks Freedom or Alligators Once upon a time, a prison warden was responsible for 22 prisoners on Death Row. These prisoners were students who had done terrible things: some illegally...
  16. Jameson

    LaTeX Uncovering the Source: How to View Latex Code in Mathjax Images

    It's strange no one has noticed but after reading through the Mathjax documentation guide, all you have to do to view the source code is right click over any Mathjax image and click "Show Source". A new window will pop up with the Latex code. Jameson EDIT: Try it here $ \displaystyle...
  17. G

    Need a code to construct an antisymmetric tensor with Mathematica 6.

    Hello! I'm doing a code in Mathematica 6.0 in order to calculate a contraction of indices with the Levi-Civita tensor (in six dimensions) and an antiSymmetric tensor A[m,n,p] (it has 3 indices running from 1 to 6). For example in order to turn A into an antisymmetric tensor, I wrote something...
  18. A

    MATLAB Help with writing a matlab code

    ?hi, im trying to write a code that should do this- create a random sized zeros vector create a random size ones vector i have to do this several times and combine it all(by that order) into one vector that should lookz like- 0000011111001111001... does anybosy have an idea how to do it...
  19. Monique

    Command /bin/sh failed with exit code 2

    I'm trying to build code in Xcode, but I keep getting the following error: xcodebuild[17565:903] Unexpected character / at line 1 xcodebuild: error: Unable to read project 'VTK.xcodeproj'. Reason: Project ../VTK.xcodeproj cannot be opened because the project file cannot be parsed. make...
  20. V

    MATLAB How to write this code in matlab?

    M0=100; var0=100; i=1:478 j=1:448 if(temp(i,j)>M) G(i,j)=M0+sqrt(double((var0*power((temp(i,j)-M),2))/V)); else G(i,j)=M0-sqrt(double((var0*power((temp(i,j)-M),2))/V)); Where temp(i,j) is an matrix. This code is not working. I am...
  21. Q

    Resistor overheated and melted color code, how do I determine type?

    I am trying to repair this device and have determined that the issue is with this melted resistor... In order to find the correct replacement i need to determine specifically what resistor this is.
  22. C

    Fortran Having some issues with a piece of fortran95 code

    Hello, I am pretty new to programming at all and am having some issues with working out why this program is not compiling: Program MAIN DO J = 1, 11 K = 10 + J P = 0.4 !POSITION OF MAXIMUM CAMBER AT 40% CHORD! M = FLOAT (J + 1)* 0.01...
  23. ChristinaJ

    Job Skills CV/Resume: Should I include a QR code?

    Should I include a QR code in a CV? Potentially useful, but maybe it could be construed as being a little pretentious. Any thoughts?
  24. Z

    C/C++ Learning C++ by reading the code of open source projects?

    learning C++ by reading the code of open source projects? Is there any resource that teaches C++ by taking an open source project (at the level of quake 3 for example)and explains the code step by step for some one who only knows the very basics . In my opinion It will be very efficient . I can...
  25. C

    Fortran Why Does My Fortran Subroutine Return the Same Value?

    Hii, Having trouble with some code I am writing, where a subroutine returns the same value regardless of different variable inputs. ... C Calculate Yth and Chi values. Compute sum of Chi-squared. Subroutine Chisquared(CPREV,CHISQ) Real...
  26. A

    When run the code below:[code]void F(){

    When run the code below: void F() { F(); } EStackOverFlow will appear. The book says that there is a loop going on. Can anyone explain to me? Because I think in the Void F function, it will only use itself once.
  27. J

    ADC INL/DNL code density testing help

    Hi Guys, Could you please help me on the derrivation of offset and amplitude formula being used in the computation of ADC INL and DNL using code density testing. below are the formulas. Appreciate any help. Regards.
  28. R

    Java Good Java IDE with code complete?

    I've been learning C# but just want to give Java a go before I start learning the difficult bits of C# to see which I prefer, most people say the 2 languages are very similar but I just wanted to see for myself. I really like having a code complete function in the IDE but I tried Netbeans but...
  29. Y

    Assembly code not running - debug help

    Homework Statement Hello all, I need to implement iterative (non-recursive) binary search in assembly. The array has 10 elements, starting from 0x10000100, in address 0x10000004 there's the element to search for, and the answer should be put in address 0x10000008 It should be for MIPS and I...
  30. J

    How can I translate this mips code into binary/hexadecimal

    Hello I have two doubts, In an exercise I have to convert a MIPS instruction into hexadecimal code. I understand a part of it. The instruction given by the professor is: Exercise 2 : bne $t2, $zero, previous instruction The solution is Co =0b0 00101, $rs =0b0 1010,$rt =0b0 0000, Imm16 =...
  31. R

    MATLAB Problem regarding Matlab code for n no of quantum well

    I have written a code which is something like that clc X = input('Molefraction of Al in system:'); n=input('no of well:'); width=zeros(1,50); for j=1:(2*n+1) width(j,:)=input('length of areas:'); end del_eg=1.247*X; V1=0.6*del_eg; V=zeros(1,100); for j=1:n...
  32. G

    MATLAB How to write Matlab code for a multivariate Beta distribution

    Hello, I am working on a problem in which I first sample two unknown probabilities, p and q, from Beta distributions, and then I want to sample both of them at the same time from a multivariate Beta distribution. This is the code that I have for sampling p and q individually from Beta...
  33. D

    Can You Crack This Code for a Job as a European Spy?

    http://www.canyoucrackit.co.uk/index.asp If you can crack it, you will get a job as a European Spy! That's the link to where you can attempt to crack the code. You get unlimited attempts! P.S. If anyone gets the code, please feel free to post here, lol
  34. R

    Designing a Modulo-16 Up/Down Counter with Grey Code State Assignment

    Homework Statement design an up down modulo-16 counter. use grey code state assignment, when x=1 the counter is to count up. when x=0 the counter is to count down. when the terminal cont of 15 is detected and the unit is counting up or when the terminal count of 0 is reached and the unit is...
  35. A

    ASME Boiler & Vessel Pressure Code Links

    Dose anybody can give me link for ASME codes for boiler & vessel pressure. Thanks
  36. J

    (TexnicCenter) How to locate errors in code

    Hi I recently uploaded what I think is the most recent update to TexnicCenter. In the past, when I built a file, I could double-click on an error message in the output window and a green arrow would appear at the line number in the source code where the error occurred. That doesn't work...
  37. M

    Python Why does this code work, python

    This isn't quite homework, it was just in my textbook as an illustration. Below is a function to return a list in reverse order. Why does it work? My brother tried to explain it to me but failed to clarify. The only line I don't understand is the third and what process takes place because of...
  38. J

    Fortran Small FORTRAN code for combinations. BUG

    small FORTRAN code for combinations. BUG! PROGRAM test implicit double precision(a-h,o-z) INTEGER :: r=2,n=4,k=1 INTEGER,allocatable :: comb(:) !array to hold a set of combinations allocate(comb(r)) comb(1)=1 CALL iterate(1,n-r+1,1) CONTAINS...
  39. M

    Python Python code for generating prime# list and evaluting a number

    Homework Statement I am attempting to allow a user to enter a number and check to see if it is in a list of already generated prime numbers Here's my attempt Where can I put the code to allow the number to be checked, the prime list generator works fine alonedef buildPrimeList ()...
  40. W

    Opinion regarding included code

    Seeking opinion regarding included code. //Processing - Processing.org int _size = 256; int _mx, _my; Ordinate _x, _y, _one; void setup() { size(this._size, this._size, P2D); _x = new Ordinate(this._size); _y = new Ordinate(this._size); _one = Ordinate.One(this._size); } void draw()...
  41. V

    Triton Depletion Code for SCALE: Solving Reactor Core Activity Issues

    Hi I'm wondering if anyone has experience working with the triton depletion code for SCALE? I'm having some issues when I'm trying to calculate the activity in radioisotope targets surrounding my reactor core.
  42. R

    C/C++ Any ideas for a small c++ code I could make?

    I thing I've got the hang of the basics of c++ and want to try and make some thing that actually has a function other than just making code to calculate something that I could already have done using a calculator. Anyone got any ideas and then when I make I code post my code and see if any...
  43. M

    Big endian and Little Endian, how to code for reversing binary value?

    Homework Statement I am trying to create a program that will convert big endian to little endian notation and vice versa. I found a way to represent unsigned integers and display their binary value. Can I use this program somehow to accomplish my goals. I am going the right way? Homework...
  44. J

    Help in Mathematica code for solutions expansion of differential equations

    About serval differential equations where A, B, D, g, \chi, c are functions of r \begin{eqnarray} &-\frac{{\chi}'}{r}+\frac{c'}{c}\left(\frac{g'}{g} -{\chi}'\right)=\frac{e^{\chi}(q A B)^2}{r^2 g^2 c^2}& \\ &c c''+c c'\left(\frac{g'}{g}+\frac{2}{r} -\frac{{\chi}'}{2} \right)=-\frac{B'^2}{2...
  45. Reshma

    Help with scilab code for calculating transmission coefficient

    I seem to be getting some arbitrary values from my Scilab code for a function. I have to generate a graph showing the dependence of the transmission on the air gap separating two higher refractive index materials i.e. I want to plot "T" as a function of "d". T = \frac{1}{1 + \beta \sinh^2...
  46. U

    MATLAB- image processing need idea for code

    Homework Statement As per the attached picture, we are basically trying to find out the time interval between the instants that the particle (black dot) is in the first region of interest and the instant that it is in the second region of interest. i have a video in which the particle in...
  47. P

    MATLAB Understanding the @ Rule in MATLAB Code with Quad Command

    HI every one what's the @ rule in the MATLAB code? especielly when we use quad command.
  48. nukeman

    Comp Sci Can someone look over my C++ code - Simple short code

    Homework Statement My computer crashed, so I can't check my code I wrote, and the school linux lab is full, so I really need some help. I already wrote the code (ill post it below) so I can't compile it and check for some errors. Can anyone quickly glance it over and see any mistakes...
  49. M

    Cryptographically secure code obfuscation

    I got to thinking about code obfuscation. Current code obfuscators use ad hoc techniques like symbol renaming. But is it possible to have a cryptographically secure code obfuscator that outputs programs that work the same way as the originals, but provably no one can understand? So here's...
  50. C

    Most significant bit (MSB) in ASCII code

    Hello You know that the MSB in each byte is always zero in ASCII code (e.g. text file). If I cut the text file by byte, then there will be 0 (which is MSB) that might reveal some information... So, are there any stochastic rules that I make the strings random in ASCII code? It will be...
Back
Top