该命令返回只是将控件返回到调用函数。
例:
function animatebar (t0, tf, x0);
% animatebar animates a bar pendulum.
:
disp ('Do you want to see the phase portrait?')
ans = input ('Enter 1 if YES, 0 if NO');
if ans==0 % see text for description
return % if the input is 0
% exit function
else
plot (x, ......) % show the phase plot
end
评论前必须登录!
注册