Let say i have a 3x3 array which made up of different numbers. If i am asked to use repmat command to replace the first row by -2's, how can I do that?

Is it possible to make it in a single step?

Printable View

- February 15th 2009, 12:23 AMelliotyangrepmat command
Let say i have a 3x3 array which made up of different numbers. If i am asked to use repmat command to replace the first row by -2's, how can I do that?

Is it possible to make it in a single step? - February 15th 2009, 12:31 AMCaptainBlack
- February 15th 2009, 12:33 AMelliotyang
Well, I must use the repmat command for that question. Anyway, I just figure out how to do it. A(1:1, :)=repmat(-2,1,3)