How to get the answer from ifourier function?

5 ビュー (過去 30 日間)
Sijie Cheng
Sijie Cheng 2016 年 12 月 16 日
回答済み: Vandana Rajan 2016 年 12 月 19 日
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?

回答 (1 件)

Vandana Rajan
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

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by