- #1

lefti2003

- 1

- 0

I am new to this forum and new to using the quad function. Some assistance would be most helpful. I appreciate all help in advance.

I have a .m file called OneExpDecay.m that has the following

syms t

x=exp(-2*t^2);

[RX,IX]=ft(x,-inf,inf);

then I have an ft.m that has the following

function [RX,IX]=ft(x,a,b)

syms t f

fr=@(t)x*cos(2*pi*f.*t);

RX=quad(fr,a,b);

fim=@(t)x*sin(2*pi*f.*t);

IX=-quad(fim,a,b);

When I run OneExpDecay.m I get the following errors that I do not understand how to resolve

?? Undefined function or method 'isfinite' for input arguments of type 'sym'.

Error in ==> quad at 81

if ~isfinite(y(1))

Error in ==> ft at 4

RX=quad(fr,a,b);

Error in ==> OneExpDecay at 3

[RX,IX]=ft(x,-inf,inf);

Thanks

Lefti