matlab中erasemode是什么意思?

如题所述

matlab 2010a版本以前有两个用户界面mlayers和mobjects用户界面erasemode是这两个界面Emode按钮的一个属性。
温馨提示:内容为网友见解,仅供参考
第1个回答  推荐于2018-03-29
The EraseMode property controls how MATLAB updates the image on the screen if the image object's CData property changes. The default setting of EraseMode is 'normal'. With this setting, if you change the CData of the image object using the set command, MATLAB erases the image on the screen before redrawing the image using the new CDataarray. The erase step is a problem if you want to display a series of images quickly and smoothly.
You can achieve fast and visually smooth updates of displayed images as you change the image CData by setting the image object EraseMode property to 'none'. With this setting, MATLAB does not take the time to erase the displayed image -- it immediately draws the updated image when the CData changes.
Suppose, for example, that you have an m-by-n-by-3-by-x array A, containing x different truecolor images of the same size. You can display them dynamically with h = image(A(:,:,:,1),'EraseMode','none');
for i = 2:x
set(h,'CData',A(:,:,:,i))
drawnow
end

Rather than creating a new image object each time through the loop, this code simply changes the CData of the image object (which was created on the first line using theimage command). The drawnow command causes MATLAB to update the display with each pass though the loop. Because the image EraseMode is set to 'none', changes to the CDatado not cause the image on the screen to erase each time through the loop.本回答被网友采纳
相似回答