Code Definition and 960 Threads

  1. P

    Where can I find a draft of C code to measure frequency using PIC16F84?

    i want to use measure the frequency of the square wave input at RA4/T0CKI of PIC16F84. so how should i start writing the code? anyone can provide some draft of the c code? thanks.
  2. BobG

    Deciphering Drake's Message: Astronomers Solve Alien Code

    By 1960, new radio telescopes were capable of detecting radio signals from at least the nearest stars and scientists began to consider what a message from outer space might look like. Dr. Frank Drake (the originator of the Drake Equation) came up with this first attempt at what a message from...
  3. X

    LaTeX Can I use the Latex code used on this site on mine?

    I really like the math code this site uses to type out the mathematics. Is there a way I can install something on my website server so that I can use it when creating webpages? If so, how?
  4. F

    MATLAB Plot Maxwell-Boltzmann Equation w/ MATLAB Code

    Hi Guys, I am trying to plot a simple Maxwell-Boltzmann Equation curve that shows me the probability of opening an ion gated channel. The issue I am having is the output shows me just a linear horizontal line that is around 0.5 probability which makes no sense given my inputs. Please take...
  5. F

    Comp Sci Calculating the First Day of the Week using the Julian Method

    Hello... the is my code: #include<iostream.h> #include<iomanip.h> void show(int m, int w, int n) { cout<<endl<<"Sun Mon Tue Wed Thu Fri Sat\n"; cout<<setw((w*5)+1); for(int r=1;r<=(7-w);r++) cout<<r<<" "; int count=0...
  6. M

    Comp Sci C++ code; unforced damped oscillator

    Homework Statement I have an assignment to make a C++ program (I've never seen C++ before, and my professor has never taught it) that makes a set of displacement values corresponding to the motion of a damped oscillator. The function is: x = A*e^{(-\gamma*t/2)} * cos(\omega*t) where...
  7. C

    Java Is there a javascript or php code to remove browsing history?

    I want to remove my clients browsing history every time they access new pages from my website. is there any code, i keep searching the net and i can't find one.
  8. N

    Assembly code microprocessor 8088 for seven segment LED

    Homework Statement i've just started learning microprocessors, and we need to program the 7-segment LED to display numbers 0-9 in increments of 1 i'm trying to get a delay of 1second between each number (and i couldn't get it) e.g., number 1 displays for 1 second, then number 2 displays for...
  9. L

    LaTeX Debugging Latex Code: 28 Errors and Still Trying

    hi. not sure if this is the right forum. i have latex code that I'm trying to get to print but it's giving me 28 errors and i can't find any of them i've got it to display nice but I'm still getting 28 errors when i run and they're all apparently related to missing brackets and stuff but i...
  10. D

    Maple How to Change Code Indent Size in Maple

    If I want to indent my code, I use spacebar, but it doesn't do it enough. How can I change the indent size?
  11. R

    MATLAB Transforming a matlab code

    Hi fellows! I need a bit of help with transforming a MATLAB code that simulate magnetic field of two concentric solenoid TO a plot that simulate the magnetic fields of high voltage transmission lines (specificly two and four lines), how can it be modified? here is the code: % GKLmagnet2.m...
  12. D

    Fortran What does errorfmt mean when running Fortran g77 code?

    Hi, I received a code written in Fortran 77, and I am trying to compile it and run it using g77. It compiles easily with no errors, but I keep getting the following error when I execute errorfmt: read unexpected character apparent state: unit 5 named jeffin last format: (10X,D13.7) lately...
  13. Ƒ

    Could Someone Compile This Code?

    ..and tell what the last line they get in doing so. program sieve_t implicit none integer*1 s(1000000), offset (10), sequence integer i, j, n n=0 sequence=4 do i=1, 10 offset(i)=0 enddo offset(1)=2 offset(2)=4 offset(3)=2 do i=1, 1000000 s(i) = 1 enddo do i=2, 1000000 if...
  14. M

    MATLAB We need a matlab code for a normalized gradient eq. help

    We need a MATLAB code for a normalized gradient eq. help! :) Hello, we need help in converting this normalized gradient equation into a MATLAB code. Please see the image. Thanks! :) http://img706.imageshack.us/img706/7998/thesisformula.jpg
  15. C

    Help With C Programming Output | Troubleshooting Solutions

    my attempt is (this is c programming) My output is really different. It gives the answer but not a detailed solution as the output above. Pls help me I really don't know how to show the long method :frown:
  16. S

    MATLAB Trying to speed up some MATLAB code

    Hi guys, I've got some MATLAB code that calculates the forward kinematics for a robotic arm. This calculation relies on the successive multiplication of a series of 4x4 matrices, and currently I have this coded (more or less) as: ... T(:,:, 1) = T0; for i = 2:njoints T(:,:, i+1) =...
  17. L

    LaTeX Why Doesn't My LaTeX Code Compile Correctly?

    hi i wrote the following code. i think it's fairly easy to understand what I am trying to get it to print. but LaTeX really doesn't like it. any advice? \documentclass[12pt]{report} \usepackage{float} \usepackage{multirow} \usepackage{graphicx} \usepackage{subfigure}...
  18. Helios

    Java Get Help with Java Script Code: Calculate Day Count Since 1922 Dec. 18

    Dear Computer People, I know nothing about Java. What I understand what "Java script" means is something that one can paste into an html document or web page. What I have is a Java script code that displays a day count since 1922 December 18. Here it is. <script> var montharray=new...
  19. W

    How to modify the following code?

    I can compile the following code, but I can not run it in my computer. How do change it? Thanks. module nrtype INTEGER, PARAMETER :: SP = KIND(1.0) INTEGER, PARAMETER :: DP = KIND(1.0D0) INTEGER, PARAMETER :: I4B = SELECTED_INT_KIND(9) INTEGER, PARAMETER :: I2B = SELECTED_INT_KIND(4)...
  20. A

    MATLAB Help! MATLAB Code for Rutherford Scattering Won't Run

    What's wrong with this MATLAB code for Rutherford scattering, it won't run for me! :( Hi, I can't do matlab...and have to plot the trajectory of alpha particles in rutherford scattering. I've made an attempt, but i know I've gone wrong somewhere. Could someone tell me how to fix it? I'd be...
  21. U

    What are all the possible 5-digit binary code combinations?

    Hi all. I recently am thinking of developing a compression software with extreme speed and compression. The simple principle behind the working of this software is that the software is converting the program into binary code. Then, five sets of 0s and 1s are converted into alphanumeric...
  22. C

    MATLAB How Can I Resolve Loop Stuck Issues in MATLAB's Shooting Method?

    Hi, I am trying to use the shooting method to determine the angle of a projectile. However for some values of distance and initial velocity my value for angles get stuck between two values. I want to put a piece of code into my shooting method which can either detect that my while loop has...
  23. M

    Any good short reads on optimisation of code? (math-specific)

    Hello I am trying to speed up a code which performs a number of tasks on a set of data. I am wondering if there are any resources on general rules and principles that can be used to speed up calculation times? I am having a real problem when there appear to be more than one way to code...
  24. P

    Recursion code for generating Gray Code in C

    Homework Statement I need to implement a recursive code for generating the Gray code for a given number of bits. For example, if the input bit is 1 it generates Gray code for 1 bit number i.e 0 and 1. Given 2, it generates Gray code for 2 bit numbers i.e 00 and 01 and so on. I don't...
  25. L

    Solving 2D Heat Diffusion Eqn w/ Finite Difference Method

    I have to write a FD expilicit method, for temp dist on 2D plane. I am trying to mod the 1D solver to 2D solver, the code below is a 1D solver. Any possible suggestions how it can be done? I initially, derived u(i,j+1) for 2D for in that derivation i,j corresponds to x,y... where as in 1D...
  26. J

    Code for fluid dynamic in 3D written in Scilab

    Hallo. I am new at forum, could please somebody send me a code for fluid dynamic in 3D written in Scilab, mathematica or Fortran. I will use it to start with learning!b Thaks, JG
  27. U

    Photon Tracking Code: Calc New dx, dy, dz after 1st Scatter

    Hello all, I'm working on coding a program that tracks photons based on Compton Scattering. However, I'm having an issue on how to deal with photons with multiple scatters. So, phi (polar) and theta (azimuthal) range from 0-pi/2 and 0-2pi, respectively, based on a random number generator...
  28. A

    This is not an error, but rather a statement about arrays.

    Homework Statement Suppose we have the following program segments: int *zPtr; int *aPtr = NULL; void *sPtr = NULL; int number,i; int z[5] = {1,2,3,4,5}; sPtr = z; point out the error of the following code: (a) ++zPtr; (b) number = zPtr; (c) number =...
  29. W

    LaTeX Latex code for Hermitian Conjugate

    Hi there, Does anyone know the Latex code for Hermitian conjugate (dagger) on TeXniccenter? Thank you!
  30. W

    MATLAB Matlab ADI Method Code | Get Help with Troubleshooting

    Hi, I've been having some difficulty with Matlab. I keep getting confused with the indexing and the loops. To set up the code, I am trying to implement the ADI method for a 2-D heat equation (u_t=u_xx+u_yy+f(x,y,t)). I have Dirichlet boundary conditions on the left, upper, and lower...
  31. N

    F90/C Weighted Linear Regression Code

    Hi Guys, Can anyone recommend a code, preferably in fortran 90/77, or possibly in C, which provides a weighted linear regression of a 3 column file? Natski
  32. P

    LaTeX Troubleshooting Latex Code: Poor Quality and Unreadable Output

    am I having a problem with it? The quality of it is so bad I cannot read any of it. It looks like this. http://i36.tinypic.com/52l646.jpg
  33. C

    Using HELIOS Code for Preparing Macroscopic XS in PARCS

    Hello all Has anybody use HELIOS code yet? I need that in order to preparing macroscopic XS to PARCS.
  34. R

    Program to convert text to morse code

    Homework Statement Hi, this is an Hw need to be submitted in 2 hrs ! So, anyone helps I would really apppreaitiate it >> in this problem I am asking the user to enter some text And I wil convert it into Morse Method, I am perfectly fin with that, But the code DOES NOT TYPE out...
  35. E

    Mathematica Troubleshooting Mathematica Code Warnings

    Hello, I have the following Mathematica code warnings: NIntegrate::slwcon: Numerical integration converging too slowly; \ suspect one of the following: singularity, value of the integration \ is 0, highly oscillatory integrand, or WorkingPrecision too small. >> NIntegrate::inumri: The...
  36. G

    Anyone enjoy code breaking puzzles?

    If so, I've got a challenge.
  37. M

    How Can I Devise a Code for Digits 0-9 with a Hamming Distance of 2?

    *Devise a code for the digits 0 to 9 whose Hamming distance is 2.* My efforts to answer this problem are kind of hard to explain, but I'll try. First I wrote out the digits 0 to 9 in binary. Then I tried to find a number that was only 2 numbers different from each one (get 2 ones when XOR...
  38. 2

    What's the morse code women have with men?

    I've heard there are researchers who study the process of men asking women on dates. They'll go to public places, with their notebooks, where people ask others on dates, and then statistics are computed. Then it gets published in academic peer-review journals. I've heard that others have...
  39. A

    What are the users of gray code?

    what are the users of gray code? (prctical aplications)
  40. R

    Need help verilog code error

    Need urgent help ...verilog code error Hello , I am new to verilog ...can someone help me urgent .. I have a task for 8 bit register where in i have to model hierarchial modeling ... here are my modules ... correct me please Someone please patietnly go through all modules and let me know...
  41. B

    LaTeX Relation between LaTeX Code: \\theta and LaTeX Code: \\mu ?

    I copied the Latex codes from a different problem thinking they'd change into the symbols, didn't really work out that way so I used Mu and X instead of the symbols for mu and theta. Sorry :D --------------------------- Homework Statement A block of mass m, acted on by a force of magnitude F...
  42. J

    Understanding the Colon (":") in jQuery Code

    I've looked all over the web, and even downloaded a http://www.pdf-search-engine.com/jquery-pdf.html" (looks very useful), but I have a very simple question. What does the colon ":" mean from the following three segment of code- (1.) SplitID : function() { return...
  43. Topher925

    Whats the dress code at national labs?

    Kind of a stupid question but I'm very interested to know. I would think business casual but a lot of the pictures I see online of people working in labs are wearing ordinary close (jeans and such). So if you were a grad student going to visit a lab for a few days what would you wear?
  44. C

    MATLAB Matlab Code Help: Read Sparse Matrix, Calculate Eigenvalues

    Hello. Can anyone help me in producing a Matlab code that will read a sparse matrix and then calculate the eigenvalues of it, show the sparsity pattern of it etc. I have the the sparse matrix data in compressed sparse row (CSR), compressed sparse column (CSC) formats and also in Co-ordinate...
  45. X

    MATLAB Who can help me to run this code in matlab?

    who can help me to run this code in matlab? I run it in my computer but the result is totally different from the book! In the book,the image is a increase curve,but my result is a decrease curve.So, is there something wrong of my MATLAB? code: syms r P A B t; P = exp(A+B*r); disp('first...
  46. X

    Troubleshooting PDE Code for a Pricing Model: Help Needed!

    I make a pricing model as the attachment and write the code as the following,but there are something wrong in the result.Who could help me to check it?! Thx so much! the code: >> dr = 0.005; Nr = 20; dt = 0.01; Nt = 1/dt; a=0.2339*0.0189; b=0.2339; delta=sqrt(0.0073); T =...
  47. T

    MATLAB Matlab code for plotting magnetic scalar potential of a sextupole

    First let me introduce myself. I'm and electronics engineer with 10 years of experience in the instrumentation of particle beams. I left the field for 10 years and have been fortunate to be granted a second lease of life on particle accelerators. Slowly over time the job has come to involve more...
  48. A

    MATLAB Matlab code for extracting random subwindows/subimages

    hi, I am doing project related to object recognition using decision trees and random subwindows.For which i nee d MATLAB code for extracting random subwindows/subimages(size is 16x16) from the image files and after that i need to get the gray values of the subimages.
  49. R

    Mathematica Mathematica Code Help: Draw Chain Segments

    Hello, I am writing a code in Mathematica to draw chain segements (Conformal Geometry - Hermetian matrix chains). The purpose of the code is to take 3 complex numbers as input and test if they are collinear or not. If collinear, output should be a line else a circle or an arc passing through...
  50. cepheid

    Create Stick Plot w/ IDL Code: Title Under 65 Chars

    Today I was trying to figure out how to create a stick plot using IDL. I'm talking about a plot in which each data point is connected to the x-axis by a vertical line. It is often used to visualize time sequences and other discrete data in engineering. I've also heard it called a stem plot, but...
Back
Top