How to get the answer from ifourier function?
3 次查看(过去 30 天)
显示 更早的评论
I try to get the inverse fourier by ifourier.
The programming is below.
clc
clear
syms t f
rect=@(x)rectangularPulse(x);
tri=@(x)triangularPulse(x);
T0=0.01;
B=150;
tt=-200:0.111:200;
m_t=tri(t/T0);
m_f=fourier(subs(m_t,t,t/(2*pi))/(2*pi),t,f);
b_f=rect(f/(2*B));
bm_f=m_f*b_f;
bm_t=ifourier(subs(bm_f,f,f/(2*pi)),f,t);
bm_t_d=abs(subs(bm_t,t,tt));
plot(tt,bm_t_d);
However, finally, I just got "Error using plot Non-numeric data is not supported in 'Line'".
What should I do?
0 个评论
回答(1 个)
Vandana Rajan
2016-12-19
Hi Sijie Cheng,
Since you are using symbolic expression, you should use the command 'fplot' instead of 'plot'.
Please use the MATLAB documentation link below for details on 'fplot'.
https://www.mathworks.com/help/symbolic/fplot.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!