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

3 次查看(过去 30 天)
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 个评论
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 CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by