Error in xlim and ylim?

46 次查看(过去 30 天)
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!

采纳的回答

Walter Roberson
Walter Roberson 2019-9-29
At some point you accidentally created a variable named xlim
  5 个评论
Muhammad
Muhammad 2024-7-30
Really helpful..
Samuel Dixon
Samuel Dixon 2024-9-25
it werent no accident

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by