I am trying to use fplot in order to plot
g = @(y) tan(y)+exp(2*y)-3; from [0 2*pi]
I have been trying: fplot(g,[0 2*pi])
Since there is a discontinuity at pi/2 it makes the graph really disproportionate.
How can I make the plot without being very skewed by the discontinuity?

回答 (1 件)

per isakson
per isakson 2014 年 2 月 17 日
編集済み: per isakson 2014 年 2 月 17 日

0 投票

Change the range of the y-axis
g = @(y) tan(y)+exp(2*y)-3; % from [0 2*pi]
fplot(g,[0 2*pi])
axh = gca;
set( axh, 'YLim', [ -100, 100 ] )
where

2 件のコメント

Kyle
Kyle 2014 年 2 月 17 日
What exactly is axh and gca?
per isakson
per isakson 2014 年 2 月 17 日
I edited the answer

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

カテゴリ

ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索

質問済み:

2014 年 2 月 17 日

編集済み:

2014 年 2 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by