how to write empty variable....
69 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
ChristianW
le 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 commentaires
Abdul Rehman Akbar
le 10 Avr 2014
Thank You very much. I was searching this command. your answer is very useful for me.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Variables dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!