Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2008-04-20
年龄: 38
帖子: 16
声望力: 18 ![]() |
![]()
ia是从一个仿真模型中导出的一个量,我要做的是把这个量的频谱显示出来,不知道用什么语句好。
下面的代码好像是说ia这个量不符合要求,我该怎么做才能正确的把ia的频谱显示出来呢?求助~ t=0:1/512:1;x=ia; y=fft(x);m=abs(y);f=(0:length(y)-1)'*512/length(y); figure(1);subplot(2,1,1),plot(t,x),grid on;title('信号检测'); ylabel('Input \itx'),xlabel('Time'); subplot(2,1,2),plot(f,m); ylabel('Abs. Magnitude'),grid on; xlabel('Frequency(Hertz)') ??? Error using ==> fft Function 'fft' is not defined for values of class 'struct'. |
![]() |
![]() |