MATLAB return语句

该命令返回只是将控件返回到调用函数。
【MATLAB return语句】例:

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 descriptionreturn% if the input is 0% exit function elseplot (x, ......)% show the phase plot end

    推荐阅读