tag:blogger.com,1999:blog-5316462986483650877.post5004435763889550433..comments2024-01-11T21:01:22.537-05:00Comments on Lunchtime Playground: Fun with Mathematica: Tip: Mathematica version of Maltab "Find" FunctionUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5316462986483650877.post-79208601881742632562017-07-29T01:30:29.697-04:002017-07-29T01:30:29.697-04:00Here is my take. It's important to understand ...Here is my take. It's important to understand so that it can be generalized. <br />/; is called "Condition". It returns a pattern match only if the condition (the thing after /;) evaluates to true. The part "x_" means "name the pattern Blank by x so I can refer to the matched pattern later." Blank matches any expression. <br /><br />To understand conditions, see "relational and logical expressions". <br /><br />So, you can extend this as follows:<br />Position[array, x_ /; (x > 5) && (x < 10)]<br />Etc.Anonymoushttps://www.blogger.com/profile/16342314709248402629noreply@blogger.comtag:blogger.com,1999:blog-5316462986483650877.post-7547111572284095172009-08-28T07:07:04.746-04:002009-08-28T07:07:04.746-04:00You can save one character as the colon is not nee...You can save one character as the colon is not needed, i.e. use<br /><br />Position[array,x_/;x>5]Anonymousnoreply@blogger.com