Why won't this plot?

1 view (last 30 days)
%% Section 1: Initalization of Variables
%increments of x
x = -4:1:-1;
%The function we are given
y = x + (1 ./ (x.^2-1));
%% Section 2: Processing
axis([-15 15 0 15])
%I want to be able to see the y function appraching the verticle asymptote '-1' from the left but my function wont graph
Serena Simpson
Serena Simpson on 18 Sep 2020
Thank you so much!

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 18 Sep 2020
The problem are the y-axis limits in the axis call.
Comment-out the axis call (as I do here) and you will immediately see the problem.
% axis([-15 15 0 15])
Star Strider
Star Strider on 19 Sep 2020
As always, my pleasure!

Sign in to comment.

More Answers (0)


Community Treasure Hunt

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

Start Hunting!

Translated by