フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to select items from a matrix depending on their values

1 回表示 (過去 30 日間)
anu
anu 2014 年 1 月 2 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
suppose i have a matrix [1 2 3 4 5 6 7 8 9 10] i want to select values which are greater than 5 but less than 7. i am not getting the right command

回答 (1 件)

Image Analyst
Image Analyst 2014 年 1 月 2 日
Try this:
m = [1 2 3 4 5 6 7 8 9 10]
elementsToExtract = m > 5 & m < 7
extractedElements = m(elementsToExtract)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by