solve equations with integration

Respuestas (1)

Torsten
Torsten el 8 de Jun. de 2016
Editada: Torsten el 8 de Jun. de 2016
Try
function main
epsquer0=1;
sol=fzero(@f,epsquer0)
function y=f(epsquer)
mu=0;
s=1;
fun1=@(x)normpdf(x,mu,s);
fun2=@(x)x.*normpdf(x,mu,s);
for k=1:length(epsquer)
epsquerk=epsquer(k);
y(k)=integral(fun2,-Inf,epsquerk)+epsquerk*integral(fun1,epsquerk,Inf);
end
Best wishes
Torsten.

Categorías

Más información sobre Programming en Centro de ayuda y File Exchange.

Preguntada:

el 7 de Jun. de 2016

Editada:

el 8 de Jun. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by