Best way to visualise data outputted from a C program

  • Thread starter Thread starter conorordan
  • Start date Start date
  • Tags Tags
    Data Program
AI Thread Summary
To visualize data from a C program modeling the motion of two masses connected by springs, MATLAB is recommended for creating dynamic simulations. Users can graph the positions and velocities over time, enhancing the visual appeal by animating the blocks and springs. A moving plot, such as a GIF or AVI, can be generated to represent the motion effectively. For more advanced visualizations, Mathematica can also be utilized. Overall, MATLAB provides the necessary tools to create engaging visual outputs for the simulation.
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 'Help with Time-Independent Perturbation Theory "Good" States Proof'
(Disclaimer: this is not a HW question. I am self-studying, and this felt like the type of question I've seen in this forum. If there is somewhere better for me to share this doubt, please let me know and I'll transfer it right away.) I am currently reviewing Chapter 7 of Introduction to QM by Griffiths. I have been stuck for an hour or so trying to understand the last paragraph of this proof (pls check the attached file). It claims that we can express Ψ_{γ}(0) as a linear combination of...
Back
Top