Error in xlim and ylim?

57 vues (au cours des 30 derniers jours)
Anne Nguyen
Anne Nguyen le 29 Sep 2019
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!

Réponse acceptée

Walter Roberson
Walter Roberson le 29 Sep 2019
At some point you accidentally created a variable named xlim
  3 commentaires
Cathie Wells
Cathie Wells le 14 Déc 2022
Mine too!
Francesco Bernardini
Francesco Bernardini le 18 Mai 2023
Mine as well!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by