我想绘制St函数St=5*cos(80*pi*t)+10*cos(400*pi*t);这个的图像,画出之后有图像界面但是没有图,求教是哪里出问题了
Fh=200;
Fl=40;
B=Fh-Fl ;
Fs=2*B+2*(Fh-B);
y=[];
x=0:(1/0.5*Fs):0.1;
i=1;
for t=0:(1/0.5*Fs):0.1
St=5*cos(80*pi*t)+10*cos(400*pi*t);
y(i)=St;
i=i+1;
end
figure;
plot(x,y);

 채택된 답변

qrbengr
qrbengr 2023년 5월 21일

0 개 추천

仅供参考,(1/0.5*Fs)等于800,这个步长会导致x为数值零,而且for只循环一次

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB 快速入门에 대해 자세히 알아보기

태그

질문:

2023년 5월 21일

답변:

2023년 5월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!