f=str2sym('((sin(pit))/(pit))^2');
Fw=fourier(f);
subplot(211)
ezplot(abs(Fw));grid on
title('幅度谱')
phase=atan(imag(Fw)/real(Fw));
subplot(212)
ezplot(phase);grid on
title('相位谱')
Untitled102
错误使用 inlineeval (line 14)
内联表达式出错 ==> abs(fourier(cos(2.*t.*pi)./t.^2, t, w)./2 + (w.*pi.*sign(w))./2)./pi.^2
未定义与 'double' 类型的输入参数相对应的函数 'fourier'。
出错 inline/feval (line 33)
INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr);
出错 ezplotfeval (line 53)
z = feval(f,x(1),y(1));
出错 ezplot>ezimplicit (line 271)
u = ezplotfeval(f, X, Y);
出错 ezplot (line 167)
hp = ezimplicit(cax, f{1}, vars, labels, args{:});
出错 sym/ezplot (line 66)
h = ezplot(fhandle(f)); %#ok
出错 Untitled102 (line 6)
ezplot(abs(Fw));grid on
Untitled102
错误使用 inlineeval (line 14)
内联表达式出错 ==> abs(fourier(cos(2.*t.*pi)./t.^2, t, w)./2 + (w.*pi.*sign(w))./2)./pi.^2
未定义与 'double' 类型的输入参数相对应的函数 'fourier'。
出错 inline/feval (line 33)
INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr);
出错 ezplotfeval (line 53)
z = feval(f,x(1),y(1));
出错 ezplot>ezimplicit (line 271)
u = ezplotfeval(f, X, Y);
出错 ezplot (line 167)
hp = ezimplicit(cax, f{1}, vars, labels, args{:});
出错 sym/ezplot (line 66)
h = ezplot(fhandle(f)); %#ok
出错 Untitled102 (line 6)
ezplot(abs(Fw));grid on