MATLAB揭秘---------第三章习题
第三章习题
>> x = [0:0.1:1];
>> y = tan(x);
>> plot(x,y),xlabel('x'),ylabel('y')
>> x = [0:0.1:1];
>> y1 = tan(x);
>> y2 = sin(x);
>> plot(x,y1);
>> hold on
>> plot(x,y2);
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
发布评论