Display only something

有些话、适合烂在心里 提交于 2019-12-11 16:59:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!