What does ~ mean in the case of an if statement?

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

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)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!