當前位置:編程學習大全網 - 編程語言 - MATLAB中: set(imh, 'erasemode', 'none') 這句命令是什麽意思?

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的支持。

  • 上一篇:有哪些新型網絡創業項目
  • 下一篇:什麽是xss攻擊?
  • copyright 2024編程學習大全網