Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Value of uninitialized persistent variable in MATLAB

Tags:

matlab

If I declare a variable as 'persistent' in MATLAB, how can I check if it has been initialized or not?

The exist() function apparently doesn't work (as the variable is treated as in existence as soon as I declare it to be persistent).

like image 906
Lucas Lindström Avatar asked Dec 29 '22 23:12

Lucas Lindström


1 Answers

isempty() was the function I was looking for. Teaches me to look at the example code from the documentation.

like image 89
Lucas Lindström Avatar answered Jan 05 '23 00:01

Lucas Lindström