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)
0 个评论
回答(1 个)
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!