Error in xlim and ylim?

61 visualizaciones (últimos 30 días)
Anne Nguyen
Anne Nguyen el 29 de Sept. de 2019
Comentada: Francesco Bernardini el 18 de Mayo de 2023
This is the code I have so far:
plot(x,y);
xlabel('Distance (m)');
ylabel('Ball Height (m)');
title('Ball Trajectory');
xlim([0 3]);
ylim([-1 2]);
There is an error saying "Array indices must be positive integers or logical values. Error in task4 (line 21) xlim([0 3]);"
Why is this so? I thought I used the xlim function correctly? How do I fix this? Thank you!

Respuesta aceptada

Walter Roberson
Walter Roberson el 29 de Sept. de 2019
At some point you accidentally created a variable named xlim
  3 comentarios
Cathie Wells
Cathie Wells el 14 de Dic. de 2022
Mine too!
Francesco Bernardini
Francesco Bernardini el 18 de Mayo de 2023
Mine as well!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by