MATLAB中: set(imh, 'erasemode', 'none') 这句命令是什么意思?
设置图形句柄为imh的图片擦写模式为none
EraserMode的四种value:'normal','none','xor','background'
在 Matlab 里利用图形的“EraseMode”属性可以实现显示新对象,擦除旧对象,而
又不破坏背景图案。图形的“EraseMode”属性有以下四种:
normal 方式
重绘整个显示区,这种方式产生的图形最准确,但较慢。
none 方式
不做任何擦除,直接在原来图形上绘制。
xor 方式
对象的绘制和擦除由背景颜色和屏幕颜色的异或而定。只擦除和屏幕颜色不一致
的旧对象的点,只绘制和屏幕颜色不一致的新对象的点。
background 方式
把旧对象的颜色变为背景色,这种方式影响被擦除对象下面的对象。
当新对象的属性修改后,应刷新屏幕,使新的对象显示出来。Matlab 里屏幕刷新
的命令是drawnow。drawnow 命令使Matlab 暂停目前的任务而去刷新屏幕。若不使用
drawnow 命令,Matlab 则等到任务序列执行完后才刷新。
EraseMode
{normal} | none | xor | background
Erase mode. Controls the technique MATLAB uses
to draw and erase objects. Use alternative erase modes for creating
animated sequences, where control of the way individual objects are
redrawn is necessary to improve performance and obtain the desired
effect.
normal — Redraw the affected
region of the display, performing the three-dimensional analysis necessary
to correctly render all objects. This mode produces the most accurate
picture, but is the slowest. The other modes are faster, but do not
perform a complete redraw and are therefore less accurate.
none — Do not erase the
object when it is moved or destroyed. While the object is still visible
on the screen after erasing with EraseMode none,
you cannot print it because MATLAB stores no information about
its former location.
xor — Draw and erase the
object by performing an exclusive OR (XOR) with the color of the screen
beneath it. This mode does not damage the color of the objects beneath
it. However, the object's color depends on the color of whatever is
beneath it on the display.
background — Erase the object
by redrawing it in the axes background Color,
or the figure background Color if
the axes Color property is none.
This damages objects that are behind the erased object, but properly
colors the erased object.
MATLAB[1] 是美国MathWorks公司出品的商业数学软件,用于算法开发、数据可视化、数据分析以及数值计算的高级技术计算语言和交互式环境,主要包括MATLAB和Simulink两大部分。
MATLAB是matrix&laboratory两个词的组合,意为矩阵工厂(矩阵实验室)。是由美国mathworks公司发布的主要面对科学计算、可视化以及交互式程序设计的高科技计算环境。它将数值分析、矩阵计算、科学数据可视化以及非线性动态系统的建模和仿真等诸多强大功能集成在一个易于使用的视窗环境中,为科学研究、工程设计以及必须进行有效数值计算的众多科学领域提供了一种全面的解决方案,并在很大程度上摆脱了传统非交互式程序设计语言(如C、Fortran)的编辑模式,代表了当今国际科学计算软件的先进水平。
MATLAB和Mathematica、Maple并称为三大数学软件。它在数学类科技应用软件中在数值计算方面首屈一指。MATLAB可以进行矩阵运算、绘制函数和数据、实现算法、创建用户界面、连接其他编程语言的程序等,主要应用于工程计算、控制设计、信号处理与通讯、图像处理、信号检测、金融建模设计与分析等领域。
MATLAB的基本数据单位是矩阵,它的指令表达式与数学、工程中常用的形式十分相似,故用MATLAB来解算问题要比用C,FORTRAN等语言完成相同的事情简捷得多,并且MATLAB也吸收了像Maple等软件的优点,使MATLAB成为一个强大的数学软件。在新的版本中也加入了对C,FORTRAN,C++,JAVA的支持。
EraserMode的四种value:'normal','none','xor','background'
在 Matlab 里利用图形的“EraseMode”属性可以实现显示新对象,擦除旧对象,而
又不破坏背景图案。图形的“EraseMode”属性有以下四种:
normal 方式
重绘整个显示区,这种方式产生的图形最准确,但较慢。
none 方式
不做任何擦除,直接在原来图形上绘制。
xor 方式
对象的绘制和擦除由背景颜色和屏幕颜色的异或而定。只擦除和屏幕颜色不一致
的旧对象的点,只绘制和屏幕颜色不一致的新对象的点。
background 方式
把旧对象的颜色变为背景色,这种方式影响被擦除对象下面的对象。
当新对象的属性修改后,应刷新屏幕,使新的对象显示出来。Matlab 里屏幕刷新
的命令是drawnow。drawnow 命令使Matlab 暂停目前的任务而去刷新屏幕。若不使用
drawnow 命令,Matlab 则等到任务序列执行完后才刷新。
EraseMode
{normal} | none | xor | background
Erase mode. Controls the technique MATLAB uses
to draw and erase objects. Use alternative erase modes for creating
animated sequences, where control of the way individual objects are
redrawn is necessary to improve performance and obtain the desired
effect.
normal — Redraw the affected
region of the display, performing the three-dimensional analysis necessary
to correctly render all objects. This mode produces the most accurate
picture, but is the slowest. The other modes are faster, but do not
perform a complete redraw and are therefore less accurate.
none — Do not erase the
object when it is moved or destroyed. While the object is still visible
on the screen after erasing with EraseMode none,
you cannot print it because MATLAB stores no information about
its former location.
xor — Draw and erase the
object by performing an exclusive OR (XOR) with the color of the screen
beneath it. This mode does not damage the color of the objects beneath
it. However, the object's color depends on the color of whatever is
beneath it on the display.
background — Erase the object
by redrawing it in the axes background Color,
or the figure background Color if
the axes Color property is none.
This damages objects that are behind the erased object, but properly
colors the erased object.