How to change values of specific elements inside a matrix?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a 10x10 matrix y. I want to look for all the elements inside y that have a value greater than 100 and divide them by 10. How do I go about this? I was thinking of this if y > 100 y = y./10; end But it doesn't work for someone reason. How can I fix this? Or are there any alternate solutions?
0 件のコメント
採用された回答
Azzi Abdelmalek
2016 年 6 月 6 日
編集済み: Azzi Abdelmalek
2016 年 6 月 6 日
idx=y>100
y(idx)=y(idx)/10
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Array Geometries and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!