1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

C help needed.

  1. Sep 28, 2011 #1
    This is an assignment for a class titled "Intro to Scientific Programming" and it is a prerequisite for Computational Physics.

    1. The problem statement, all variables and given/known data

    Create a graph of the position of a damped oscillator as a function of time.


    2. Relevant equations

    The equation is x = A*e^((-b/2m)*t)cos(omega*t + phi) where phi = 0 and m = 2.

    3. The attempt at a solution

    I'm having a hard time debugging this. There are no compiler errors, I just can't get it to graph the function. The graph is made using some library called "philsplot". Here is the code,
     
  2. jcsd
  3. Sep 28, 2011 #2
    Nevermind! Figured it out.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: C help needed.
  1. Need help using C+ (Replies: 2)

  2. C\C++ help needed (Replies: 2)

  3. C program help needed (Replies: 3)

Loading...