What does ~ mean in the case of an if statement?
17 views (last 30 days)
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
0 Comments
Accepted Answer
Image Analyst
on 18 Apr 2014
It means "not". Basically it's saying that if stats.Area is not empty (in other words, it has values), then do something.
More Answers (1)
See Also
Categories
Find more on Startup and Shutdown 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!