how to write empty variable....
조회 수: 225 (최근 30일)
이전 댓글 표시
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
채택된 답변
ChristianW
2013년 3월 4일
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
Abdul Rehman Akbar
2014년 4월 10일
Thank You very much. I was searching this command. your answer is very useful for me.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!