how to use handles on subplot?

11 次查看(过去 30 天)
nirit
nirit 2018-8-23
评论: Adam 2018-8-23
hello. newbie on handles.
I have an image and 2 different algorithms, each resulting 2 different outputs, which mark pixels on the image. and I want to compare the 2 outputs visually. so I want to plot on one figure 2 subplots - each containing the same image- say frame0. when the keyboard is pressed (for example the right arrow) I want both subplot to show frame1.. and so one. the only different thing between the two subplot is that subplot(1) shows the output of alg1, and ubplot(2) shows the output of alg2. how can this be done smartly using handles?
thanks.
  1 个评论
Adam
Adam 2018-8-23
hAxes(1) = subplot( 1, 2, 1 );
hImage(1) = imagesc( hAxes(1),... );
hAxes(2) = subplot( 1, 2, 2 );
hImage(2) = imagesc( hAxes(2),... );
Then you can just update the 'CData' property of hImage(1) and hImage(2) to whatever you want from your two algorithms.

请先登录,再进行评论。

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by