Best way to visualise data outputted from a C program

  • Thread starter Thread starter conorordan
  • Start date Start date
  • Tags Tags
    Data Program
conorordan
Messages
11
Reaction score
0

Homework Statement



I've written some C code that models the motion of two masses attached to a wall (and each other) by springs like this.

The output file is 5 columns; the time, and the positions and velocities of each block at that time.

I'm not sure how to visualise my data, ideally I want to make a simulation that shows two blocks moving as described by the data, I'm open to doing more coding and I have Matlab and Mathematica.

Homework Equations




The Attempt at a Solution



So far I've just been using Matlab to graph the motion but it isn't terribly interesting, I want something that moves. A moving plot (like a GIF file) of the Lissajous curves being plotted would be good but I'm not sure what software I need for this.

Thanks
 
Physics news on Phys.org
You can use MATLAB to draw the blocks and springs, if that's what you're after.
Draw the blocks in the correct locations, than add each spring.
If you have fully licensed matlab, you can even save it as an AVI.
 
Thread 'Need help understanding this figure on energy levels'
This figure is from "Introduction to Quantum Mechanics" by Griffiths (3rd edition). It is available to download. It is from page 142. I am hoping the usual people on this site will give me a hand understanding what is going on in the figure. After the equation (4.50) it says "It is customary to introduce the principal quantum number, ##n##, which simply orders the allowed energies, starting with 1 for the ground state. (see the figure)" I still don't understand the figure :( Here is...
Thread 'Understanding how to "tack on" the time wiggle factor'
The last problem I posted on QM made it into advanced homework help, that is why I am putting it here. I am sorry for any hassle imposed on the moderators by myself. Part (a) is quite easy. We get $$\sigma_1 = 2\lambda, \mathbf{v}_1 = \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} \sigma_2 = \lambda, \mathbf{v}_2 = \begin{pmatrix} 1/\sqrt{2} \\ 1/\sqrt{2} \\ 0 \end{pmatrix} \sigma_3 = -\lambda, \mathbf{v}_3 = \begin{pmatrix} 1/\sqrt{2} \\ -1/\sqrt{2} \\ 0 \end{pmatrix} $$ There are two ways...
Back
Top