Why won't this plot?
1 次查看(过去 30 天)
显示 更早的评论
%% 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
plot(x,y)
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
2 个评论
Asad (Mehrzad) Khoddam
2020-9-18
First, use more points:
x = -4:.1:-1;
Then remove the axis limil:
% axis([-15 15 0 15])
采纳的回答
Star Strider
2020-9-18
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.
plot(x,y)
% axis([-15 15 0 15])
.
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!