You're not looking to reshape the vector, but to replicate the vector.
This can be done using the "repmat" function. You can type "help
repmat" to see the details, but to do just what you have there, it can
be done like:
A = 1:4;
AA = repmat(A, [1 4]);
2010/5/24 Miĥail Vasiljev <address@hidden <mailto:address@hidden>>
Hello!
Probably this question is answered somewhere but searching google was
not helpful. I have a vector, say,
A = 1:4;
I want to create another vector, with a form
AA = 1,2,3,4,1,2,3,4,1,2,3,4;
i.e. I need a vector who's elements are elements of vector A, just
repeated n times. How can I achieve this?
Thank you!
--
Miĥail Vasiljev <address@hidden <mailto:address@hidden>>
_______________________________________________
Help-octave mailing list
address@hidden <mailto:address@hidden>
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
------------------------------------------------------------------------
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave