Error while excuting script in project - stellar motion

조회 수: 2 (최근 30일)
Tushar
Tushar 2024년 9월 5일
편집: Suraj Kumar 2024년 9월 5일
not understaing what the error in this.
  댓글 수: 1
Shivam
Shivam 2024년 9월 5일
Probably, clear the xlabel from workspace if you have previously set something like, xlabel = 'Wavelength' .

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

답변 (1개)

Suraj Kumar
Suraj Kumar 2024년 9월 5일
편집: Suraj Kumar 2024년 9월 5일
The error message that you are encountering in MATLAB typically arises when there's a conflict between a variable and a function name.
You can check if a variable named 'xlabel' exists or not in the workspace by using the 'which' function.
Then, you can try clearing the variable from the workspace by using the 'clear' function before setting the xlabel.
plot(lambda,s,".-")
clear xlabel
xlabel("Wavelength")
ylabel("Intensity")
Hope this works !

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by