What is the cause of undefined variable or function error.

조회 수: 1 (최근 30일)
tarmizi adam
tarmizi adam 2012년 10월 12일
Hello and a good day. I just wanna ask a question about 'undefined variable or function' error.
i got an error saying
"Undefined variable or function Target might refer to the function target."
I'm just curious. What is the main cause of this type of error ?
Because, previously my function worked just fine and i haven't change a thing and suddenly this error popped up. Thanks in advance...

답변 (1개)

Matt Fig
Matt Fig 2012년 10월 12일
MATLAB is case sensitive. Target, target, tarGet, TarGet are all different things. If your function is named target, don't call it as Target.
clear all
Tar = 6;
TAR = 7;
tar = 8;
whos
  댓글 수: 9
tarmizi adam
tarmizi adam 2012년 10월 12일
yep, let me try to check on that. i'll try some adjustments to that part...
tarmizi adam
tarmizi adam 2012년 10월 12일
thanks Walter. i've change some of my if else statement. It works !

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by