作业帮 > 综合 > 作业

数学建模问题利用matlab数学软件编制m文件

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/06/05 05:59:18
数学建模问题利用matlab数学软件编制m文件
数学建模利用matlab数学软件编制m文件完成源程序及程序运行结果.
至少利用两个函数plot,plot3,campass,mesh,polar,ezpolar,ezplot等描述两幅图像(图像任选)
clc
clear all
x = -pi:.1:pi;
y = sin(x);
plot(x,y)
figure;
t=0:pi/50:10*pi;
plot3(sin(t),cos(t),t)
xlabel('sin(t)')
ylabel('cos(t)')
zlabel('t')
grid on
axis square
figure;
[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
mesh(Z);
figure
t1= 0:.01:2*pi;
polar(t1,sin(2*t1).*cos(2*t1),'--r')
ezpolar('1+cos(t)')
h = ezplot('x^2')
set(h, 'Color', 'm');