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 Exchange에서 Entering Commands에 대해 자세히 알아보기

질문:

2016년 11월 12일

댓글:

2016년 11월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by