當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


MATLAB Semilogy()用法及代碼示例

它使用 x 的線性標度和 y 的對數標度生成 x 和 y 值的圖。

用法

semilogy(Y) //	It generates a plot using a base 10 logarithmic scales for the y-axis and linear scales for the x-axis. It plots the column of Y versus their index.
semilogy(X1,Y1,...)//	     It plots all Yn versus Xn pairs.
semilogy(X1,Y1,LineSpec,...)// It plots all the lines described by the Xn,Yn,LineSpec triples. LineSpec determine line style, marker symbol, and color of the plotted lines.
semilogy(...,'PropertyName',PropertyValue,...)//  It sets property values for all the charting lines created by semilogy. 
semilogy(ax,...)//     It generates the line in the axes specified by ax instead of in the current axes (gca). The option ax precedes any of the input argument combinations in the previous syntaxes.
h = semilogy(...)//   It returns a vector of chart line objects.

示例

創建一個圖形,y 軸為對數刻度,x 軸為線性刻度。

x=t,y=e^t,0≤t≤2π
t=linspace (0, 2*pi,200);
semilogy(t, exp(t))
grid

輸出:

MATLAB Semilogy()



相關用法


注:本文由純淨天空篩選整理自 MATLAB Semilogy()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。