plot(x,y, ‘linespec’) linespec: 顏色、類型、記號
color:y,r,b type: x,o,+,s,d maker: :(點線), -. (虛線)
plot(…,’屬性名1’, ’屬性值1’, ‘屬性名2’, ‘屬性值2’ )
PN_array={‘Color’,‘LineWidth’}
PV_array={‘y’, ‘3’}
plot(x,y,PN_array,PV_array)
text(), xlabel(), ylabel(),title,legend,axis
set(0,”defaultAxesLineStyleOrder’, {‘-*’, ‘-o’})
三維畫圖
meshgrid,ndgrid
plot3,mesh,meshc,meshz,surf,surfc,surfz
ezplot3,ezmesh
通過句柄設置參數
p=plot(x1,y1,x2,y2)
set(p(1), ‘LineWidth’, ‘2’)
組合畫圖
subplot(2,2,1)
subplot(2,2,2)
subplot(2,1,2)
clf: clear figure
syms x;
expand,factor,limit
得到鼠標的座標
get(gca, ‘CurrrentPoint’)
ginput
設置鼠標的樣式
set(gcf, ‘Pointer’, ‘cross’)
clear;
clc;
GUI對象
str=sprint(‘to