I was looking at on Matlab code , I could not understand the use of tilde ~ before if condition .
if ~isfield(ArgDS,'mu')

 採用された回答

Star Strider
Star Strider 2016 年 11 月 12 日

5 投票

The tilde ‘~’ is a logical negation. So the if condition will be true when 'mu' is not a field of the ‘ArgDS’ structure.

2 件のコメント

boureghda mohammed
boureghda mohammed 2016 年 11 月 14 日
Thanks for the clarification "Star Strider"
Star Strider
Star Strider 2016 年 11 月 14 日
My pleasure.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by