Error while excuting script in project - stellar motion

not understaing what the error in this.

댓글 수: 1

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 !

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

질문:

2024년 9월 5일

편집:

2024년 9월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by