Code Definition and 908 Threads

  1. K

    Mathematica Looking for a generic code using Mathematica

    Dear all, Iam looking for a generic code that could express the following functions: Subscript[mata, 1] = hl[[1]]; Subscript[mata, 2] = matg[[2]].hl[[1]] + hl[[2]]; Subscript[mata, 3] = matg[[3]].matg[[2]].hl[[1]] + matg[[3]].hl[[2]] + hl[[3]]; Subscript[mata, 4] =...
  2. N

    MDS/cyclic code, binary string question

    Homework Statement Suppose n\leq2 Let C be the code consisting of all binary strings of length n in which the sum of the bits is even. Is C and MDS code? is C a cyclic code? Homework Equations An MDS code is one where the codewords are separated by a maximum number of bits d. MDS codes obey...
  3. S

    LaTeX How do I auto-fit brackets and fractions in Latex without using \Bigg?

    I recently deleted my Latex code for my dissertation and now I'm starting from scratch. In my last code I had a line of code at the beginning that does all of my auto fitting for brackets, fractions etc. without having to worry about using \Bigg etc. but I can't seem to remember what it is, I...
  4. R

    C/C++ Is C++ code different on mac and PC

    I'm about to start a module in C++ programming and I was just wondering if the code I learn in college (on P.C's) will be useable on macs Xcode. As in will I be able to EXACTLY the same code on both?
  5. Saladsamurai

    LaTeX What Happened to LaTeX Click-to-See Code Function?

    Once upon a time I could click on a LaTeX image and a new window with the code used to generate the image would pop up. This was super useful in learning LaTeX. This function gone?
  6. A

    Mathematica Mathematica not supporting graphs code is as

    mathematica not supporting graphs,,,code is as Dear Fellow I was trying to make graph using mathematica but because of imaginary appearing mathematica is not supporting don't now how to evaluate the graph,,where code for mathematica is as rho = 1.74*10^(3); lambda = 9.4*10^(11); mue =...
  7. M

    C# Where can I find a plethora of C# program codes on Planet Source Code?

    please i want c# programs code... please i want c# programs code...
  8. Z

    Matlab code using ode45 difficulty

    Homework Statement I've been trying to get this code to work: ode45(@(t,y) fallode(t,y,B), [0, tmax], [31330, 0]) Homework Equations function dy = fallode(t, y, B) % ODE function to model a fall over a large range of % altitudes, reaching up to high subsonic Mach numbers. % y(1) is...
  9. T

    Animal's genetic code redesigned

    http://www.bbc.co.uk/news/science-environment-14492948" Just want to discuss this development. IMO, we are not prepared for this kind of revolution, unless we fully understand the implications and effect of engineering the genetic code without exactly knowing the outcome. I know this is...
  10. N

    Getting an Arxiv Endorsement Code - Neel's Guide

    Hi all, I have written a paper which I wanted to put in arxiv classical physics section. I sent an endorsement request to an endorser in the relevant section and he agreed to endorse the paper in arxiv. He asked me to send him the 6 character alphanumeric endorsement code as suggested...
  11. H

    Unsteady flow code - Problem with space loop

    Hi all, I have discretized my equations in a way that for example the velocity depends on the velocity of the previous neighboring element so: h = number of elements t = 0: 0.5 : 10 for j= 1 : length(t) for i = 2: h v(i,j) = v(i-1,j) + b p(i,j) = p(i,j) +b end end This is not my...
  12. J

    Fortran Converting equations to Fortran code

    Hi everyone I've been doing maths for quite a while now, but have never done any programming until recently. What I'm finding difficult is how you go from an initial value/boundary value problem on a bit of paper to a piece of code that will approximate the equation. I've done a bit of book...
  13. T

    How to Connect VHDL Counter Output to a Binary Decoder?

    Homework Statement structure or behavior VHDL code of a 5-bits binary counter with a sync. load signal to preset the counter to a specific initial state. the output of the counter (Q0 to Q4) are connected to a binary decoder that shows the state of the counter.Homework Equations The Attempt at...
  14. pairofstrings

    How to open any software and look at it's code?

    I want to open any given program and look at it's coding, can anyone tell me how it can be done?
  15. B

    Is Source Code Film's Interpretation of Quantum Physics Flawed?

    having watched the film source code where they try and persuade that quantum physics allows for the brain to contain infinite parallel worlds i wondered if anyone made sense of it. As far as i could tell it was total rubbish from start to Finnish. Even down to the guy managing to send a text...
  16. C

    C/C++ How to learn assembly code for debugging VC++?

    Sometimes when I try to debug my codes, VC++ brings me something I believe are assembly codes which I couldn't read at all. I want to know where I can learn these to better understand what is going on at low level. I am quite comfortable with high level programming, but I believe I really need...
  17. C

    MATLAB Improving Tumor Detection with Matlab: A Collaborative Approach

    Hey, I'm working on a DSP project that is using Matlab to improve the detection ratios of Computer aided Diagnosis (CAD). However the companies that are capable of doing this sort of CAD ensure that their code is not distributed. If anyone has or knows how to get a piece of code like...
  18. B

    Python Python code for mapping numbers n text file

    Dear Programmers I am having text file having huge data. From the text file i would like to map the two numbers that are present in the same brackets and the values should not considered if they are present in different numbers. say for example I want to map number "4758 & 3895" that are in...
  19. Loren Booda

    HTML/CSS Accessing the text code of an HTML file for editing

    I had installed FileZilla FTP freeware on my computer. Later, I was unable to edit my HTML file (pushed wrong button?) Whenever I tried to open or edit it using Word (my only editor which now seems to accept HTML), the webpage would appear, rather than the text code. I am using Windows 7 on...
  20. N

    LaTeX Learn Latex Code: Best Sources to Get Started

    What good sources are there to learn latex code? Because I'm finding it frustrating trying to post up homework problems and trying to use paint with my laptop is equally frustrating.
  21. MartinJH

    HTML/CSS HTML Code for Firefox to Stop Right-Click Copying

    I realize HTML isn't strictly a 'coding language' or so I've heard. I have a good friend who has a site he needs to prevent users from 'right clicking and copy'. Its a guitar tab site and he has spent relentless hours transcribing a band whos songs are far from easy. So to prevent, to a certain...
  22. K

    Mathematica How to make a simplified general code for repetitive formulations in Mathematica

    Hi there, I have altogether 17 formulations or expressions which are repetitive and have link from each other. My question is that how to make these formulation or expressions in a simpler form. In another word, how to make the codes or syntax become shorter due to these repetitive...
  23. H

    Need A Finite Element Magnetics Code That Handles Dynamic Modeling

    To the EE Forum, I am a new guy on this Physics Forum and this is my first post. I have downloaded a free software code, Finite Element Method Magnetics (FEMM) solver (see http://www.femm.info/wiki/Download) but it doesn’t work because FEMM is limited to solving low frequency electromagnetic...
  24. Orion1

    Mathematica How Can You Extract Numerical Values from Output Box Data in Mathematica?

    \text{In}[1]:=\text{Solve}\left[\partial _{\theta } \text{Sin}[\theta ]==0,\theta \right] \text{Out}[1]:=\left\{\left\{\theta \to -\frac{\pi }{2}\right\},\left\{\theta \to \frac{\pi }{2}\right\}\right\} Is there a Mathematica source code command that can read a specific numerical value...
  25. B

    Seeking Computer Vision Source Code for Texture Analysis

    Dear All, I am working on digital image processing. I want to do texture analysis. I need computer vision source code. I could not find the source code. If you have these source code please share me.
  26. Z

    MATLAB Need help to solve of Matlab code

    When a resistor (R), capacitor (C) and battery (V) are connected in series, a charge Q builds up on the capacitor according to the formula Q(t) = CV(1 − e−t/RC) if there is no charge on the capacitor at time t =0. The problem is to monitor the charge on the capacitor every 0.1 seconds in...
  27. N

    Solving G95 Coarray Test Code Compile Error

    Hi all, I am having difficulty compiling the following code in g95, which is supposed to handle coarrays... The code is: ! PROGRAM test implicit none INTEGER :: a INTEGER :: m, i IF ( THIS_IMAGE() == 1 ) THEN READ(*,*) m DO i = 1,NUM_IMAGES() a[i] = m END DO END...
  28. A

    How can I create realistic gravity code for my video game?

    Hello! I am a programmer and I am working on a video game, up until now I have used "gravity" to make objects fall just based off simple positioning code. I want to create realistic gravity code though! Here is how the code works... You simply create a variable and assign it a value.. ex...
  29. Orion1

    Mathematica How Can Mathematica Extract and Reuse Output Values for Further Computations?

    \text{In}[1]:=\text{Solve}\left[\partial _{\theta } \text{Sin}[\theta ]==0,\theta \right] \text{Out}[1]:=\left\{\left\{\theta \to -\frac{\pi }{2}\right\},\left\{\theta \to \frac{\pi }{2}\right\}\right\} Is there a Mathematica source code command that can read a specific numerical value from...
  30. V

    Troubleshooting Verilog Code on FPGA Boards

    Verilog Code Help [closed] Sorry to bother anyone but I figured it out on my own.
  31. S

    How can I efficiently store and access previous values in a MATLAB code?

    Homework Statement I have a problem storing values in an array in Matlab. If i want to return values according to the formula: A(v,u)=v u^2-A(v-1,u-1) where v is the row number and u is the coloumn number. So, we need to know the previous elements in the matrix to calculate the next...
  32. B

    MATLAB, help debugging my code.

    I'm asked to create a function that accepts any number of inputs, then computes the sum of all the arguments. I am asked to test the function using the four arrays, a,b,c,d defined in the calling program. Here is my code: When I run this, I get these errors: ? In an assignment A(I) =...
  33. J

    MATLAB How to code an fprintf if I am printing a value

    ok I know how to code an fprintf if I am printing a value, but I want to make a "title" print for example. Mass Time Error fprintf values here. ... ... .... fprintf values here... ...
  34. G

    LaTeX Printing Latex Code from University Computers

    Not sure where to post this. I'm trying to write my dissertation, and both the examiners and I would prefer it if I used latex for the required notation. The frustrating thing is that even though I do know how to produce latex code, I don't know how to save it into a format that the computer...
  35. Simfish

    MATLAB Matlab R2011a's new feature: portable C/C++ code directly from MATLAB

    Matlab R2011a's new feature: "portable C/C++ code directly from MATLAB" Does anyone have more information about it? Does this mean that we could write most of our C code using MATLAB first, and then run the MATLAB coder? (C is important for speed, but MATLAB makes displaying output and...
  36. J

    Effective Error Correction Codes for Noisy Channels in FPGA-ARM Interfaces

    I'm designing an interface between an ARM-CPU and a FPGA and have a pretty noisy channel between them. So I was wondering if anyone have any tip of error correction code on the FPGA side except the Hamming method I am using right now. What I want is a method which can correct if the...
  37. P

    Comp Sci JavaScript Problem: Code Access Between Frames

    Homework Statement I'm required to make a page that has the following format: Left Frame Items with prices and check boxes next to them An "Update Order" button at the bottom so the order details on the Right Frame can be updated. Right Frame A "receipt" form with all the...
  38. PainterGuy

    Once can test the code in DOS too?

    hello nice people, some guy was saying something that one can check his code in dos also. the instructor said yes. i didnt understand it. it will mean that you can test the code even without compiler. i didnt understand the whole story so i hope you can fill in the gaps. any ideas what they...
  39. Femme_physics

    How come we haven't advanced since binary code?

    This may sound like a stupid question, but binary code seems so "simple", but it's been with us since the 1940's. What'd be wrong with tertiary code, say?
  40. Demon117

    This code keep giving me 0 for mode

    This is the code I have: #include <iostream> #include <cstring> using namespace std; template <class X> X mode(X *data, int size) { register int t, w; X md, oldmd; int count, oldcount; oldmd = 0; oldcount = 0; for(t=0; t<size; t++) { md = data[t]; count =...
  41. J

    C code, converting float into integer

    Hi guys, i am using the C language and have created the following function: void counter (double c) { FILE *fp; char output[]="output.xls"; int n,p=0; int r=0; int i,j; float x=0; fp=fopen(output,"w"); fprintf(fp,"rmax\tnumber of particles within rmax\r\r\n"); for(n=1;n<=10;n++)...
  42. K

    Matlab code for solving complex numbers

    Hi All, I have been trying to solve a complex number equation for character impedance with MATLAB but it continues to tell me that "indexing must appear last on index addressing". I am new to MATLAB so I think that my code is wrong. What I am using is complex sqrt (R+jwL)(G+jwC)...
  43. C

    Hi,I want to know about SIMULATE code. how can I get its

    Hi, I want to know about SIMULATE code. how can I get its manual? thanks alot
  44. FeDeX_LaTeX

    Morse Code: Practical Uses & Benefits?

    Hello; I am sorry I didn't know where to create this thread, it isn't really academic or career guidance... I know morse code, I can get every letter if played slowly (I can't decipher it when played at a quick rate). I have known how to 'speak' morse code for about a year or so now, but...
  45. G

    How Do You Modify a Key in a Min-Heap to Maintain Heap Properties?

    Homework Statement Let A be a min-heap. The operation HEAP-MODIFY(A, i, k) changes the key in the node i to a new value k, then rearranges the elements in a min-heap. Give an implementation of the HEAPMODIFY that runs in O(lgn) time for an n-element min-heap. Homework Equations The Attempt at...
  46. E

    Mathematica Error in Code: Investigating Possible Solutions

    Hi, I have the following code: For[SNRdB = 0, SNRdB <= 30, SNRdB = SNRdB + 1, SNR = 10^(SNRdB/10); y = FindRoot[ ExpIntegralE[0, x/SNR] - ExpIntegralE[1, x/SNR] == SNR, {x, 0.5}]; R = N[1/SNR*NIntegrate[Log[2, q/y]*Exp[-q/SNR], {q, y, Infinity}]]] what is the error in this code...
  47. Demon117

    C/C++ What Are the Errors in This C++ Code?

    #include <iostream>; using namespace std; double w = 3.4; bool p = true; long foo(int a, int b); void goo(int &a, double b); float soo(long a, double b); bool too(double b); int boo(); int main() { int c,d; c = 4; d = c * 3; cout << foo(c,d) << endl; cout << c << " " << d <<...
  48. C

    VHDL code - write to a binary .dat file

    I'm attempting to write some simulation VHDL code that will be able to write the output of my simulation as a single string of binary values in a .dat file. So far I've used both the textio and std_logic_textio libraries to write the signals to a .txt file as text. Is there a library I can...
  49. M

    MATLAB Making MATLAB Code Efficient: A 2xN Vector

    Hi everyone, I'm trying to make my MATLAB code run as efficiently as possible. II have a 2xN vector designated like so: acc1(1,:) = A*rc(1,:); acc1(2,:) = B*rc(2,:); where A and B are scalars,. Is it possible to combine these two into a single line of code? Cheers
  50. S

    Sentinel value how to correct my code to make it more efficient

    Hello to all I have been given a task in "C" environment ... to read a text file with a sequence of positive integers the sequence should be terminated with a sentinel value of -1 Values in text file is : 6 9 17 4 12 8 7 -1 We have to read the integers from text file, display the...
Back
Top