필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
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 ?

채택된 답변

Steven Lord
Steven Lord 2023년 4월 3일
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
Vincentas Rimkus
Vincentas Rimkus 2023년 4월 3일
You are right. I see my mistake, I was thinking that matlab refers to the image name only.
Thanks for help :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by