问题
can we have the display command with certain conditions ,
For example, if we want to just print things their value are bigger than 7 . in other word how can we have
Display $( x.val> 7)
In general, is it possible to have condition on display command?
回答1:
Yes, you can use the $ condition on a Display statement like in any, e.g., assignment statement:
Scalar x /2/;
Display$(x>3) 'X is greater than 3';
Display$(x>1) 'X is greater than 1';
来源:https://stackoverflow.com/questions/51783645/display-only-something