find the values of a that are between 2 and 6(inclusive)
3 ビュー (過去 30 日間)
古いコメントを表示
A>>
7.24 0.80 *7.31* *9.24* *3.09*
1.06 0.06 *8.97* *1.37* *0.55*
8.67 8.88 *9.92* *0.71* *0.90*
3.45 9.01 *9.15* *4.80* *2.29*
4.56 5.16 *5.33* *7.10* *7.61*
1.16 0.64 *0.08* *8.76* *8.06*
8.96 6.23 *9.96* *6.93* *7.71*
8.15 6.84 *6.95* *1.88* *7.36*
4.75 1.54 0.28 3.10 9.04
[r,c]=find(A<=2 & A<=6) is this right?
0 件のコメント
採用された回答
Image Analyst
2012 年 12 月 4 日
Some things to try:
A=[7.24 0.80 7.31 9.24 3.09
1.06 0.06 8.97 1.37 0.55
8.67 8.88 9.92 0.71 0.90
3.45 9.01 9.15 4.80 2.29
4.56 5.16 5.33 7.10 7.61
1.16 0.64 0.08 8.76 8.06
8.96 6.23 9.96 6.93 7.71
8.15 6.84 6.95 1.88 7.36
4.75 1.54 0.28 3.10 9.04]
linearIndexes = A>=2 & A<=6;
[rows, columns]=find(linearIndexes)
inRange = A(linearIndexes)
0 件のコメント
その他の回答 (1 件)
Walter Roberson
2012 年 12 月 4 日
Any value that is <= 2 will also be <= 6 . Reconsider your comparisons.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!