Info

此问题已关闭。 请重新打开它进行编辑或回答。

Returning values in a matrix between 1 and 2

1 次查看(过去 30 天)
how would I write a script that returns the values in a matrix between 1 and 2. both using for loops and not.
  4 个评论
Star Strider
Star Strider 2014-4-20
See the gt function and its friends (all linked-to at the end of the page).
Kimberly
Kimberly 2014-4-21
I just ended up using the find function for the matrix and it worked

回答(1 个)

Walter Roberson
Walter Roberson 2014-4-21
See also logical indexing
values = YourMatrix(YourMatrix > 1 & YourMatrix < 2);

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by