How can we plot a function with domain involving infinity

1 回表示 (過去 30 日間)
zahid
zahid 2017 年 4 月 19 日
回答済み: Jayesh Shimpi 2019 年 10 月 5 日
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 件のコメント
Muhammad
Muhammad 2019 年 1 月 25 日
Use the tick property in Matlab plot as discribed belowpic.png

サインインしてコメントする。

採用された回答

Andrew Newell
Andrew Newell 2017 年 4 月 19 日
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)

その他の回答 (1 件)

Jayesh Shimpi
Jayesh Shimpi 2019 年 10 月 5 日
Infinity symbol used in Matlab for limit to plot the graph

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by