摘要: 1.for的循环绘图 n=2;for i=1:n x=linspace(0,2*pi,20*i); y=sin(x); subplot(1,n,i); plot(x,y,'ko-'); xlabel('x'); ylabel('y'); title('sin plot');end 2.for循环的嵌 阅读全文
posted @ 2022-04-20 21:50 无敌小金刚 阅读(3419) 评论(0) 推荐(0)
摘要: 注意在写语句时,注意空格与缩进 1.if语句 if condition action; end 2.if-else语句 if condition1 action1 else action2 end 3.elseif语句 if condition1 action1 elseif condition2 阅读全文
posted @ 2022-04-20 20:07 无敌小金刚 阅读(1808) 评论(0) 推荐(0)