Q:

Generate a 2 x 4 matrix variable mat. Replace the first row with 1:4. Replace the third column (you decide with which values)

0

 Generate a 2 x 4 matrix variable mat. Replace the first row with 1:4. Replace the third column (you decide with which values).

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> mat = [2:5; 1 4 11 3]

mat =

 2 3 4 5

 1 4 11 3

>> mat(1,:) = 1:4

mat =

 1 2 3 4

 1 4 11 3

>> mat(:,3) = [4;3]

mat =

 1 2 4 4

 1 4 3 3

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now