Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculating FT using matlab quad function

  1. Nov 25, 2009 #1
    Hi All,
    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

    then I have an ft.m that has the following

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

    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

    Error in ==> OneExpDecay at 3

  2. jcsd
  3. Nov 25, 2009 #2
    The error that your receiving about functions being undefined for inputs of type sym means that you're trying to send a symbol into a function that is expecting a number (or numbers).

    Here, my guess is that you need to use finite limits (inf and -inf won't cut it). Try replacing them with numbers.

    Hope this helps.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook