How to plot this function?
Mostrar comentarios más antiguos
Hello,
Could you please help me plot this function with Matlab ?
<http://img638.imageshack.us/img638/3205/fonction.png >
I'm a beginner. Your help will be valuable to me.
Many thanks
Respuesta aceptada
Más respuestas (4)
Matt Tearle
el 14 de Mzo. de 2011
Then plotting can be done by
x = linspace(xmin,xmax,npoints);
y = constant*erfc(x);
plot(x,y)
2 comentarios
Michaël
el 14 de Mzo. de 2011
Matt Tearle
el 15 de Mzo. de 2011
Why would you want to? This function is defined via an improper integral, which means you'll have to do an infinite-domain integral for each value of z. This will be slow and will introduce all sorts of numerical errors. On the other hand, the error function is a well-known function -- its implementation in MATLAB is stable and tested. Why reinvent the wheel?
But if you really want to, you can use something like quad to do the integral.
Michaël
el 14 de Mzo. de 2011
0 votos
Michaël
el 14 de Mzo. de 2011
0 votos
Michaël
el 15 de Mzo. de 2011
0 votos
Categorías
Más información sobre Noncentral t Distribution en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!