how to write empty variable....
68 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
while doing a calculation if i get a variable named "varName" with empty value i wanted to display a message "Dont not Exist"...... how to write a code for checking whether a variable contains value or it is empty... please do reply...
0 Commenti
Risposta accettata
ChristianW
il 4 Mar 2013
A = [] % A is empty
isempty(A) % Is A empty?
exist(A,'var') % Does A exist as variable?
% empty and not existing isnt the same thing
3 Commenti
Abdul Rehman Akbar
il 10 Apr 2014
Thank You very much. I was searching this command. your answer is very useful for me.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Variables in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!