Error while excuting script in project - stellar motion

not understaing what the error in this.

1 Kommentar

Probably, clear the xlabel from workspace if you have previously set something like, xlabel = 'Wavelength' .

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Suraj Kumar
Suraj Kumar am 5 Sep. 2024
Bearbeitet: Suraj Kumar am 5 Sep. 2024
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 !

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 5 Sep. 2024

Bearbeitet:

am 5 Sep. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by