What does ~ mean in the case of an if statement?
Show older comments
This one appears to be ungoogleable due to the short length of the character.
Take for example...
if ~isempty([stats.Area])
Does this mean the equivalent of a 'not' function? Ie in this case it would be if the area array is not empty do something?
Thanks in advance.
TT
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 18 Apr 2014
It means not(your expression')
Exemple
a=[1 0]
~a
or
not(a)
1 Comment
TT Simmons
on 18 Apr 2014
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!