欢迎您访问52IJ教育培训网,今天小编为你分享的师说方面的学习知识是通过网络精心收集整理的:“plot颜色_...j=1:3 figure(1); a=sin(tx(i)y(j)); plot(t,a)...”,注意:所整理内容不代表本站观点,如你有补充或疑问请在正文下方的评论处发表。下面是详细内容。
clear;
clc;
str=[];
x=[10 20 30];
y=[1 4 8];
t=0:0.5:10;
colorstring={'y','m','c','r','g','b','k','r.','bo','cx'};
for i=1:3
for j=1:3
figure(1);
a=sin(t*x(i)*y(j));
plot(t,a,colorstring{(i-1)*3+j});
hold on;
figure(2);
b=cos(t*x(i)*y(j));
plot(t,b,colorstring{(i-1)*3+j});
hold on;
str=[str;['i=',num2str(x(i)),',j=',num2str(y(j))]];
end
end
figure(1);
legend(str);
figure(2);
legend(str);

其他回答
clear;
clc;
str=[];
x=[10 20 30];
y=[1 4 8];
t=0:0.5:10;
for i=1:3
for j=1:3
figure(1);
a=sin(t*x(i)*y(j));
plot(t,a,'g');
...
展开
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
