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

3 views (last 30 days)
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)

Answers (1)

KSSV
KSSV on 8 Aug 2021
If A is 2*2 matrix. To multiply the second row with a constant:
K = 5 ; % a constant
A(2,:) = K*A(2,:) ;
  3 Comments
Hung Tat Ho
Hung Tat Ho on 8 Aug 2021
Edited: Hung Tat Ho on 8 Aug 2021
thanks mate> do you know how to change entry matrix 2*2 to be equal to the entry matrix (1*2)?

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!