why am I getting error "Undefined function or variable"
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Mallikarjun Yelameli
am 12 Mai 2018
Beantwortet: Mallikarjun Yelameli
am 13 Mai 2018
I have defined a variable called "bestDimen". There is no error. I crosschecked many times. The script is also correct. It was working fine. But all of a sudden it starts giving following error.
"Undefined function or variable 'bestDimen'."
I am using "Matlab 2017a" Please reply fast. It's very urgent. I need help
3 Kommentare
Jan
am 12 Mai 2018
Please read: Why your question is not urgent. Your chances to get a useful answer grow if you omit this term.
Akzeptierte Antwort
Jan
am 12 Mai 2018
Bearbeitet: Jan
am 12 Mai 2018
"all of a sudden" - you can be sure, that this happens, because you instruct Matlab explicitly to delete the variable.
Without seeing the code, all I can do is guessing. I guess, that you are using scripts and any of the scripts contain a clear, clear vars or even worse a clear all statement.
Using scripts for productive work is a bad programming practice. Prefer functions, because they avoid polluting the workspaces and in consequence no clear 'ing is need.
2 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!