shape.m
来自「matlab例子」· M 代码 · 共 14 行
M
14 行
t=0:0.01:10;f=0.5;w=2*pi*f;
y=5*cos(w*t)-2*cos(4*w*t-pi*2/3)-1;
y=y/2;
for i=1:1001
if y(i)<=0
y(i)=0;
end
end
subplot(2,2,1);
plot(t,y,'black');
axis([0,10,-2,4]);
y2=cos(w*t-pi/3);
subplot(2,2,2)
plot(t,y2);grid;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?