?? plotline.m
字號:
% ATLAST65中的繪制直線方程子程序plotline
%
function plotline(a,b,c,s)
% PLOTLINE(a,b,c,s) plots the line ax + by = c
% with axis set to [-s,s,-s,s].
% If the last input arguments is omitted, its
% default value is taken to be 5.
if nargin == 3
s=5;
end
if (a == 0 & b == 0 & c ~= 0)
error('No such line exists')
end
if b == 0
x = c/a;
plot([x,x],[-s,s])
else
y1 = (c+a*s)/b; y2 = (c-a*s)/b;
plot([-s,s],[y1,y2])
end
axis([-s,s,-s,s])
ds = 0.2*s;
set(gca,'XTick',[-s:ds:s])
set(gca,'YTick',[-s:ds:s])
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -