How can we plot a function with domain involving infinity

How can we plot a function with the domain involving infinity? Suppose I want to plot the following function:
f(y)=(2*pi*y)^(-1/2)*exp(-y/2); y>0
How can I do this in MATLAB?
Thanks

 Respuesta aceptada

Of course, you can't plot the whole thing, but you can plot enough so that it's obvious where the curve is going. One approach is to let MATLAB choose the domain for you:
f = @(y) (2*pi*y).^(-1/2).*exp(-y/2);
ezplot(f)

Más respuestas (1)

Jayesh Shimpi
Jayesh Shimpi el 5 de Oct. de 2019
Infinity symbol used in Matlab for limit to plot the graph

Categorías

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

Etiquetas

Preguntada:

el 19 de Abr. de 2017

Respondida:

el 5 de Oct. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by