Filter löschen
Filter löschen

Error using quad for nummerical integration

1 Ansicht (letzte 30 Tage)
DoVile Last Name:
DoVile Last Name: am 29 Okt. 2012
I am unable to understand why i cant use the quad function for nummerical integration..
tk = 1.5;
Assymptotisk=@(x) sqrt(2/pi)*1/sqrt(x)*exp(-x);
vc= quad(Assymptotisk,tk,inf);
The above code reproduces the problem in my main program..
Thanks in advance!

Akzeptierte Antwort

Pedro Villena
Pedro Villena am 29 Okt. 2012
this equation has a singularity to Inf
tk = 1.5;
Assymptotisk=@(x) sqrt(2/pi).*exp(-x)./sqrt(x);
vc= quad(Assymptotisk,tk,1e18);
  2 Kommentare
DoVile Last Name:
DoVile Last Name: am 29 Okt. 2012
You were right, i looked at my problem again and it turns out i was using the wrong function :)
Thanks
Andrei Bobrov
Andrei Bobrov am 29 Okt. 2012
quadgk(Assymptotisk,tk,inf);
integral(Assymptotisk,tk,inf);% with MATLAB R2012a

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by