複製鏈接
請複製以下鏈接發送給好友

stairs

(在matlab中stairs函數用於繪製階梯狀圖)

鎖定
stairs是在matlab中的一個函數,其功能是用於繪製階梯狀圖。在matlab的命令窗口中輸入doc stairs或者help stairs即可獲得該函數的幫助信息。
外文名
stairs
命令窗口
輸入doc stairs即可獲得幫助信息
示例二
繪製直方圖
相關函數
stem,plot,ezplot,bar

stairsMATLAB函數stairs簡介

stairs函數簡介

在matlab中stairs函數用於繪製階梯狀圖,在圖像處理中的直方圖均衡化技術中有很大的意義。在matlab的命令窗口中輸入doc stairs或者help stairs即可獲得該函數的幫助信息。

stairs調用格式

stairs(Y)
stairs(X,Y)
stairs(...,LineSpec)
stairs(...,'PropertyName',propertyvalue)
stairs(axes_handle,...)
h = stairs(...)
[xb,yb] = stairs(Y,...)
各種調用格式的詳細用法參見matlab的幫助文檔。

stairs相關函數

stem,plot,ezplot,bar

stairs程序示例

stairs示例一

圖1stairs 圖1stairs
x = linspace(-2*pi,2*pi,40);
stairs(x,sin(x))
這個示例來自matlab的幫助文檔,運行結果如右圖1:

stairs示例二

繪製直方圖
下面這個示例簡單的描述了用這個函數繪製直方圖
rng('default');
n = rand(1,10);
stairs(n);