I am very new to Matlab and was wondering how to graph the function y= (x-1)/(x+1)

I have written the code: x= -5:5; y= (x - 1)/(x + 1); plot(x,y)
It does not come up with any errors but when I select Run my graph does not show

 Accepted Answer

Just include a . before division
x= -5:5
y= (x - 1)./(x + 1)
plot(x,y)

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 30 Jul 2017

Answered:

MSP
on 30 Jul 2017

Community Treasure Hunt

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

Start Hunting!