What is the cause of undefined variable or function error.
1 次查看(过去 30 天)
显示 更早的评论
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...
0 个评论
回答(1 个)
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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!