Error while excuting script in project - stellar motion

4 visualizaciones (últimos 30 días)
Tushar Saratkar
Tushar Saratkar el 5 de Sept. de 2024
Editada: Suraj Kumar el 5 de Sept. de 2024
not understaing what the error in this.
  1 comentario
Shivam
Shivam el 5 de Sept. de 2024
Probably, clear the xlabel from workspace if you have previously set something like, xlabel = 'Wavelength' .

Iniciar sesión para comentar.

Respuestas (1)

Suraj Kumar
Suraj Kumar el 5 de Sept. de 2024
Editada: Suraj Kumar el 5 de Sept. de 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 !

Categorías

Más información sobre Application Deployment en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by