Borrar filtros
Borrar filtros

Problem with plot function

1 visualización (últimos 30 días)
Hanna Sundling
Hanna Sundling el 10 de Oct. de 2019
Comentada: Image Analyst el 10 de Oct. de 2019
I can not run this function, it says that something is wrong with my function. Help? It says that for every function of all my scripts.
I also have x = linspace(-5,5,100) in the script.

Respuesta aceptada

adeq123
adeq123 el 10 de Oct. de 2019
Hi,
Works for me. Probably you clear your workspace before running this part of the code. Therefore the x is not found.
x = linspace(-5,5,100);
y = (x-1)./(x.^2+x);
plot(x,y);
  3 comentarios
adeq123
adeq123 el 10 de Oct. de 2019
There is no error - like I said, works for me.
My assumtion is that the author of the topic cleared the workspace before running the code and this is why she gets the error.
Image Analyst
Image Analyst el 10 de Oct. de 2019
haisong:
For some reason, you forgot to show lines 1 and 2 (where you claim the crucial linspace was called) in the image you posted! Please attach the image showing those lines, or attach the m-file script with the paper clip icon.

Iniciar sesión para comentar.

Más respuestas (1)

haisong zhao
haisong zhao el 10 de Oct. de 2019
No problem in the code

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by