Displaying two functions by use of subplots

6 Ansichten (letzte 30 Tage)
Dan
Dan am 2 Dez. 2012
Good evening everyone,
I have, what I hope is, a very simple question. I'd like to display two functions (by use of subplots ) side-by-side and starting at the same time.
Below is a brief explanation of each of the functions does.
function_scatter - a simple scatter graph.
function_images - displays a folder full of images with imshow.
subplot(2,1,1), function_scatter();
subplot(2,1,2), function_images();
I am able to display them one after another, but they will not stay side-by-side or start simultaneously.
Thanks for your help,
  3 Kommentare
Dan
Dan am 3 Dez. 2012
Walter,
Thank you for your reply.
Each of the functions work independently of each other. function_scatter uses a while loop to loop though an array to display the data sequence. function_image uses a folder directory to play 300 image sequences. The issue I have currently is having them side-by-side and to commence at the same time so that you are able to relate to what is currently happening in the image sequences on the scatter.
Thanks
José-Luis
José-Luis am 3 Dez. 2012
Make a single function combining the two you have and pass the handle of both subplots to it. Plot inside the new function.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 3 Dez. 2012
Instead of using a while loop in each routine, use a timer() that updates both graphics.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by