how to integral2?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
how can i integral a function which was written in matlab but there is wrong , i dont no where it is :
syms tau
syms y
f= @(y,tau)y*exp(-0.5.*y.^2/ tau)
expecty=integral2(f, -2,4,0,Inf,'auto')
0 Commenti
Risposta accettata
Birdman
il 16 Mar 2018
integral2 is defined for function handle, therefore you do not need symbolic variables:
f= @(y,tau)y.*exp(-0.5.*y.^2./ tau)
expecty=integral2(f, -2,4,0,Inf,'auto')
6 Commenti
Torsten
il 16 Mar 2018
Neglecting numerical aspects like division by 0, your integral is +Inf.
Best wishes
Torsten.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!