?? shili14.m
字號:
function shili14
h0=figure('toolbar','none',...
'position',[200 150 450 250],...
'name','實例14');
axis([0 10 0 10]);
hold on
x=[];
y=[];
n=0;
disp('單擊鼠標左鍵點取需要的點');
disp('單擊鼠標右鍵點取最后一個點');
but=1;
while but==1
[xi,yi,but]=ginput(1);
plot(xi,yi,'bo')
n=n+1;
disp('單擊鼠標左鍵點取下一個點');
x(n,1)=xi;
y(n,1)=yi;
end
t=1:n;
ts=1:0.1:n;
xs=spline(t,x,ts);
ys=spline(t,y,ts);
plot(xs,ys,'r-');
hold off
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -