MATLAB揭秘---------第三章习题

第三章习题

>> x = [0:0.1:1];
>> y  = tan(x);
>> plot(x,y),xlabel('x'),ylabel('y')

1

>> x = [0:0.1:1];
>> y1 = tan(x);
>> y2  = sin(x);
>> plot(x,y1);
>> hold on
>> plot(x,y2);

2
3.

>> x = [-pi:0.2:pi];
>> x = linspace(-pi,pi);
>> x = linspace(-pi,pi,50);
>> [x,y] = meshgrid(-3:0.1:2,-5:0.1:5);
>> [x,y] = meshgrid(-5:0.2:5,-5:0.2:5);
>> t = [0:0.1:10*pi];
>> x = exp(-t).*cos(t);
>> y = exp(-t).*sin(t);
>> z =t;
>> plot3(x,y,z)
>> grid on

5

发布了84 篇原创文章 · 获赞 18 · 访问量 5805

猜你喜欢

转载自blog.csdn.net/qq_44486550/article/details/105306170