how to multiply certain numbers in a matrice
1 回表示 (過去 30 日間)
古いコメントを表示
if have a matrice A=[1,5,4;3,1,5;6,3,1] But I want to multiply only certain numbers for example A=[2,5,4;3,2,5;6,3,2] how do i do this.
0 件のコメント
回答 (2 件)
Guillaume
2017 年 2 月 8 日
You haven't explain what certain numbers mean. At a guess:
A(A == 1) = A(A == 1) * 2;
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!