function y=myfun1(x) z=x+1; y=z*2;
function y=myfun2(x) if x>10 y=99; elseif x>0 y=1; else y=-1; end
function y=myfun3(x) switch x case 1 y=9; case 2 y=99; case 3 y=999; otherwise y=0; end
function y=myfun4(x) for i=1:2:10 for j=1:5 y(i,j)=x; end end
标签:function,case,end,10,99,Matlab,2.22 From: https://www.cnblogs.com/physical-oceanography/p/16760235.html