error out of bond in xlabel

조회 수: 2 (최근 30일)
Mohammad Umair
Mohammad Umair 2021년 9월 15일
답변: Steven Lord 2024년 10월 9일
plot(p,Tcurrent)
xlabel('length of rod')
ylabel('temperature')
  댓글 수: 1
KSSV
KSSV 2021년 9월 15일
What exactly is your question?

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

답변 (2개)

Mathy
Mathy 2024년 10월 9일
Hi Mohammad,
Hope this helps!

Steven Lord
Steven Lord 2024년 10월 9일
If this is the error you receive:
xlabel = 42;
xlabel('length of rod')
Index exceeds the number of array elements. Index must not exceed 1.

xlabel appears to be both a function and a variable. If this is unintentional, use 'clear xlabel' to remove the variable 'xlabel' from the workspace.
likely the cause is that you've defined a variable named xlabel (as I did on the first line of the code above) and then tried to call the xlabel function. Rename the variable and make sure that the variable with that name has been cleared from memory and try again.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by