|
hi,
I think the problem lie to the fact that quad function accepts only 1 "sym" variable. So, sym(f) and sym(t) in your function input have caused the error.
In the line 81 of function "quad" is
% if ~isfinite(y(1))
You could see that only numbers are supported.
"El " <el_stamatakos@hotmail.com> wrote in message <hei2d3$ls8$1@fred.mathworks.com>...
> Hi All,
> I enter a function at command line
> >>x=1/exp(pi*t^2)
>
> I then call a function as below
> [RX,IX]=ft(x,-inf,inf)
>
> where the function ft is below
>
>
> function [RX,IX]=ft(x,a,b)
> syms t f real
>
> RX=quad('x*cos(2*f*pi*t)',a,b);
> IX=-quad('x*sin(2*f*pi*t)',a,b);
> RX=simplify(RX);
> IX=simplify(IX);
>
> i get the following error
>
> ??? Error using ==> inline.subsref at 14
> Not enough inputs to inline function.
>
> Error in ==> quad at 77
> y = f(x, varargin{:});
>
> Error in ==> ft at 6
> RX=quad('x*cos(2*f*pi*t)',a,b);
>
>
> What is the problem. Thanks for your help
|