用matlab绘制图形,具体要求如下试用MATLAB在同一图形窗口、不同坐标系中分别作出y=cos(x)、y= cos (2x)、y= cos(3x)、y= cos (4x)在(0,2pi)的图形.

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 04:46:35
用matlab绘制图形,具体要求如下试用MATLAB在同一图形窗口、不同坐标系中分别作出y=cos(x)、y= cos (2x)、y= cos(3x)、y= cos (4x)在(0,2pi)的图形.

用matlab绘制图形,具体要求如下试用MATLAB在同一图形窗口、不同坐标系中分别作出y=cos(x)、y= cos (2x)、y= cos(3x)、y= cos (4x)在(0,2pi)的图形.
用matlab绘制图形,具体要求如下
试用MATLAB在同一图形窗口、不同坐标系中分别作出y=cos(x)、y= cos (2x)、y= cos(3x)、y= cos (4x)在(0,2pi)的图形.

用matlab绘制图形,具体要求如下试用MATLAB在同一图形窗口、不同坐标系中分别作出y=cos(x)、y= cos (2x)、y= cos(3x)、y= cos (4x)在(0,2pi)的图形.

syms x

subplot(2,2,1)

ezplot(cos(x),[0,2*pi]);grid on

subplot(2,2,2)

ezplot(cos(2*x),[0,2*pi]);grid on

subplot(2,2,3)

ezplot(cos(3*x),[0,2*pi]);grid on

subplot(2,2,4)

ezplot(cos(4*x),[0,2*pi]);grid on