MATLAB MATLAB plot on an axe on a different figure

AI Thread Summary
The discussion revolves around a MATLAB programming challenge involving real-time data plotting. The user is trying to plot data from a main file (main.m) in a separate figure (test1.m) using for-loops for data gathering and plotting. The user acknowledges MATLAB's lack of multi-threading support and seeks guidance on how to effectively use handles to plot data in real-time. A response clarifies that while the user won't have direct access to plot handles, they can obtain a handle to the plot window itself, which is crucial for implementing the desired functionality. The conversation emphasizes the need for understanding handles in MATLAB to achieve real-time plotting.
Gean
Messages
5
Reaction score
0
Hi,

I have this problem:
I have a main file (main.m) in which is coded a for loop (needed for some data-gathering). De data is stored in a vector.
This vector is passes to a 2nd figure (test1.m) which has an axe. Here I want to plot the data in a "real-time" mode. I do this with another for-loop.
Because MATLAB apparently doens't support Multi-threading, I want to edit main.m on this way:
Inside the for-loop I want to say something like: plot in the axe in test1.m.

I understand that this must be done with handles, but I can't figure out how to do this.


Any help?
 
Physics news on Phys.org
Thanks!
 

Similar threads

Replies
8
Views
2K
Replies
1
Views
2K
Replies
32
Views
4K
Replies
1
Views
3K
Replies
1
Views
2K
Replies
4
Views
3K
Back
Top