本文目录

图像:

MATLAB代码:

[cc lang=”matlab”]
clc;
clear all;

x=-pi:0.1:pi;
y1=sin(x);
y2=cos(x);
y=sin(x)+cos(x);

subplot(2,2,1);
plot(x,y1);
grid on;
title(‘y=sin(x)’);

subplot(2,2,2);
plot(x,y2);
grid on;
title(‘y=cos(x)’);

subplot(2,2,3);
plot(x,y);
grid on;
title(‘y=sin(x)+cos(x)’);

subplot(2,2,4);
plot(y,x);
grid on;
title(‘x=sin(y)+cos(y)’);
[/cc]

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注