Hi All,(adsbygoogle = window.adsbygoogle || []).push({});

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

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Calculating FT using matlab quad function

Loading...

Similar Threads - Calculating using matlab | Date |
---|---|

B Calculating the area of a circle or square using decimals | Nov 9, 2017 |

B Log(x), an easy and useful way to calculate it | Dec 20, 2016 |

Easy and useful way to calculate Log(a+b) | Feb 28, 2016 |

Finding sin and cos without using calculator | Oct 9, 2015 |

Finding a cube root of a number without using calculator . | Apr 27, 2015 |

**Physics Forums - The Fusion of Science and Community**