Best way to visualise data outputted from a C program

  • Thread starter Thread starter conorordan
  • Start date Start date
  • Tags Tags
    Data Program
Click For Summary
SUMMARY

The discussion centers on visualizing data output from a C program that models the motion of two masses connected by springs. The user seeks to create a dynamic simulation of the motion, utilizing MATLAB and Mathematica for visualization. While initial attempts using MATLAB produced static graphs, the user desires a more engaging representation, such as a moving plot or GIF of Lissajous curves. The recommendation is to use MATLAB to draw the blocks and springs, with the option to save the animation as an AVI file if fully licensed.

PREREQUISITES
  • Proficiency in C programming for data modeling
  • Familiarity with MATLAB for data visualization
  • Understanding of Lissajous curves for dynamic plotting
  • Basic knowledge of animation techniques in MATLAB
NEXT STEPS
  • Explore MATLAB's animation capabilities to create dynamic visualizations
  • Learn how to implement Lissajous curves in MATLAB for enhanced graphics
  • Investigate exporting MATLAB animations as AVI files
  • Research Mathematica's visualization tools for alternative simulation options
USEFUL FOR

This discussion is beneficial for C programmers, data visualization enthusiasts, and anyone interested in creating dynamic simulations using MATLAB or Mathematica.

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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
6K
Replies
7
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 25 ·
Replies
25
Views
3K
Replies
1
Views
3K
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K