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

15 visualizaciones (últimos 30 días)
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

Respuesta aceptada

MSP
MSP el 30 de Jul. de 2017
Just include a . before division
x= -5:5
y= (x - 1)./(x + 1)
plot(x,y)

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by