This solution is outdated. To rescore this solution, sign in.
-
3 Comments
Raja
on 5 Jun 2013
Why this not works?????
a=repmat(eye(2),n);
Pascal Geschwill
on 17 Dec 2013
Because you apparently cannot get odd matrix dimensions with the repmat command.
Andrew Small
on 31 Mar 2014
The output is twice the required size - the repmat function repeats the given matrix n times. So repmat(eye(2),1) gives [1 0;0 1], not [1].
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!