How to skip a discontinuity in a fplot?
Mostrar comentarios más antiguos
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?
Respuestas (1)
per isakson
el 17 de Feb. de 2014
Editada: per isakson
el 17 de Feb. de 2014
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
- gca is a Matlab function, see gca, Current axes handle
- axh is a name I use for axes handles
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects 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!