How can we plot a function with domain involving infinity

9 vues (au cours des 30 derniers jours)
zahid
zahid le 19 Avr 2017
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
  1 commentaire
Muhammad
Muhammad le 25 Jan 2019
Use the tick property in Matlab plot as discribed belowpic.png

Connectez-vous pour commenter.

Réponse acceptée

Andrew Newell
Andrew Newell le 19 Avr 2017
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)

Plus de réponses (1)

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

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by