On Tue, Jul 31, 2012 at 11:33 AM, Mahvish Nazir
<address@hidden> wrote:
On Fri, Jul 27, 2012 at 3:07 PM, Juan Pablo Carbajal
<address@hidden> wrote:
On Fri, Jul 27, 2012 at 3:54 PM, Jordi Gutiérrez Hermoso
<
address@hidden> wrote:
> f = eval(vectorize("@(t)
> (cos(10^11*pi*(t-(0.12*10^(-6)))^2))^2*exp(i*14.178*t)"))
> quadgk(f, -5, 5)
> quadv(f, -5, 5)
If you do not understand what Jordi means just try this (using his
definition of f)
t=linspace(.01,1,1e3)'; plot(t,f(t))
If you are doing numerical calculus to understand/study real life
phenomena, you may not need infinite resolution and you can use a
smoothed version of your function. If you want "exact" mathematics you
will need a lot of iterations for your numerical scheme... if the
integral exits...
when i write the first line of above code, it gives me parse error, syntax error
Ok when i run this code, it says"error tolerance not met. estimated error 0.86536. ans=0.112577+0.018141i"
Can i take this answer or it is wrong since error tolerance is not met?