Error in xlim and ylim?

27 visualizzazioni (ultimi 30 giorni)
Anne Nguyen
Anne Nguyen il 29 Set 2019
Commentato: Samuel il 25 Set 2024
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!

Risposta accettata

Walter Roberson
Walter Roberson il 29 Set 2019
At some point you accidentally created a variable named xlim
  5 Commenti
Muhammad
Muhammad il 30 Lug 2024
Really helpful..
Samuel
Samuel il 25 Set 2024
it werent no accident

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by