Can't open any script or function

조회 수: 7 (최근 30일)
m.
m. 2015년 11월 23일
댓글: Stephen23 2015년 11월 23일
I've made some scripts and functions, and they all worked fine. Now I want to re-open them and everytime I get the same error:
for colon operator with char operands first and last operands must be char.
This error shows up when opening any script or function. I've no idea what's wrong

답변 (1개)

the cyclist
the cyclist 2015년 11월 23일
My best guess is that before, you had some variables open in your workspace, that perhaps were numeric variables. Now, you either don't have those variables defined, or they are not numeric now.
Can you please add a little more detail? When you say "made some scripts ...", do you mean you have edited and saved a *.m file, and ran it from the command line?
When you say "re-open" them, what do you mean?
Could you add one example of such a function here?
  댓글 수: 2
m.
m. 2015년 11월 23일
I just made a new script called 'test.m' inside the script is 'a=3'.
When running the script now, the output looks normal. However, when I close the script, I can't open it again. It gives the error: for colon operator with char operands first and last operands must be char. This happens with all scripts/functions.
Never seen this before
Stephen23
Stephen23 2015년 11월 23일
How do you open the script, and how are you running it?

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by