Borrar filtros
Borrar filtros

using imread on script get not valid name error, but no errors on command window

2 visualizaciones (últimos 30 días)
Hey,
I am writing a simple script:
I=imread("original.jpg")
imshow(I)
But then i press run, i get an error:
Workspace, and pahts are setup correctly. Because then I copy paste same command in command window and it runs flowlessly
Looked at all the forums, and does not find anything helpfull.
As I am new on matlab, so maybe i am missing some simple detail ?

Respuesta aceptada

Steven Lord
Steven Lord el 3 de Abr. de 2023
What's the name of your script? Does it satisfy the rules listed in that dialog?
Does it start with a letter and contain only letters, numbers, or underscores?
Spaces are not allowed in script names, though people often do try to add them. Neither are parentheses, so if you downloaded a file with the same name twice the myscript.m file can be run but the myscript (1).m file cannot.
  1 comentario
Vincentas Rimkus
Vincentas Rimkus el 3 de Abr. de 2023
You are right. I see my mistake, I was thinking that matlab refers to the image name only.
Thanks for help :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by