Replacing array values which match a condition

22 ビュー (過去 30 日間)
Bineet_Mehra
Bineet_Mehra 2016 年 8 月 20 日
コメント済み: Bineet_Mehra 2016 年 8 月 20 日
Hello
It is easy to replace some element of a matrix meeting a condition by a constant number. lets consider a situation. For example if i have a 100*100 matrix of angles. I was to replace all the angle > 90 deg with 180-that angle. How can i acheive this ?
Thanks
Thanks a lot

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 8 月 20 日
編集済み: Azzi Abdelmalek 2016 年 8 月 20 日
A(A>90)=180-A(A>90)
  1 件のコメント
Bineet_Mehra
Bineet_Mehra 2016 年 8 月 20 日
Thanks a lot . Works exactly as i wanted

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by