필터 지우기
필터 지우기

Error in xlim and ylim?

조회 수: 36 (최근 30일)
Anne Nguyen
Anne Nguyen 2019년 9월 29일
댓글: Francesco Bernardini 2023년 5월 18일
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
  댓글 수: 3
Cathie Wells
Cathie Wells 2022년 12월 14일
Mine too!
Francesco Bernardini
Francesco Bernardini 2023년 5월 18일
Mine as well!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by