How to get the answer from ifourier function?

조회 수: 3 (최근 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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by