Date: Feb 1, 2013 12:06 PM
Author: Steven Lord
Subject: Re: Simple definite  Integration; Not able to integrate



"SAI KANTAREDDY" <reddynithin91@gmail.com> wrote in message
news:kego7g$c4s$1@newscl01ah.mathworks.com...
> p=1300; v=1/60; rho=8000;
> c=674; sig=0.0015; a=0.0000051;
> Temp_o =30; x=0.05; y=0.05; z=0.05; t_o=0.18;
>
> f =@(t) [(t_o-t)^(-0.5)]/[sig^2+8*a*(t_o-t)]*exp(-2*((x-v*t)^2
> +y^2)/(sig^2+8*a*(t_o-t))-(z^2)/(4*a*(t_o-t)));
>
> temp=quadgk(f,0,0.18)
>
> it says:
> ??? Error using ==> mpower
> Inputs must be a scalar and a square matrix.


If you want to perform elementwise operations (which you do, for QUADGK)
instead of matrix operations, use operators like ".^", ".*", and "./"
instead of "^", "*", and "/".

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com