Error while excuting script in project - stellar motion
조회 수: 2 (최근 30일)
이전 댓글 표시
not understaing what the error in this.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1766804/image.png)
댓글 수: 1
Shivam
2024년 9월 5일
Probably, clear the xlabel from workspace if you have previously set something like, xlabel = 'Wavelength' .
답변 (1개)
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 !
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!