how to multiply only the second row of matrix with a number

2 ビュー (過去 30 日間)
Hung Tat Ho
Hung Tat Ho 2021 年 8 月 8 日
編集済み: Hung Tat Ho 2021 年 8 月 8 日
how to multiply only the second row of matrix 2*2 with a random integer and change entry 2*2 to be equal to the entry (1,2)

回答 (1 件)

KSSV
KSSV 2021 年 8 月 8 日
If A is 2*2 matrix. To multiply the second row with a constant:
K = 5 ; % a constant
A(2,:) = K*A(2,:) ;
  3 件のコメント
KSSV
KSSV 2021 年 8 月 8 日
K = 5 ; % a constant
iwant = K*A(2,:) ;
Hung Tat Ho
Hung Tat Ho 2021 年 8 月 8 日
編集済み: Hung Tat Ho 2021 年 8 月 8 日
thanks mate> do you know how to change entry matrix 2*2 to be equal to the entry matrix (1*2)?

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by