How to calculate in a matrix

1 回表示 (過去 30 日間)
min wong
min wong 2016 年 11 月 29 日
コメント済み: Laith Mohammed 2019 年 11 月 21 日
If I had a matrix A=[12 3 65,2 3 6,68 15 40]
I want to change second array of matrix A multiply 10
will be like A=[12 3 65,20 30 60,68 15 40]
How can I do ?
Thank you

採用された回答

KSSV
KSSV 2016 年 11 月 29 日
A=[12 3 65 ;2 3 6 ;68 15 40] ;
iwant = A ;
iwant(:,2) = 10*iwant(:,2) ;
Read about matrix indexing......
  2 件のコメント
min wong
min wong 2016 年 11 月 30 日
thank you
Laith Mohammed
Laith Mohammed 2019 年 11 月 21 日
Good answer just reverse iwant(2,:) = 10*iwant(2,:)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by