Borrar filtros
Borrar filtros

What is the cause of undefined variable or function error.

2 visualizaciones (últimos 30 días)
tarmizi adam
tarmizi adam el 12 de Oct. de 2012
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...

Respuestas (1)

Matt Fig
Matt Fig el 12 de Oct. de 2012
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 comentarios
tarmizi adam
tarmizi adam el 12 de Oct. de 2012
yep, let me try to check on that. i'll try some adjustments to that part...
tarmizi adam
tarmizi adam el 12 de Oct. de 2012
thanks Walter. i've change some of my if else statement. It works !

Iniciar sesión para comentar.

Categorías

Más información sobre Holidays / Seasons en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by