Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: creating a larger matrix from a smaller matrix
Replies: 2   Last Post: Jan 22, 2013 6:52 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matt J

Posts: 4,996
Registered: 11/28/09
Re: creating a larger matrix from a smaller matrix
Posted: Jan 22, 2013 6:24 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Erick " <erickleiss@navmar.com> wrote in message <kdn2pu$noq$1@newscl01ah.mathworks.com>...
> Hello,
>
> I have a 10x1 matrix with a bunch of values in each row. I would like to create a 40x1 matrix using the values in each row of the 10x1 matrix. I would like the first value in the 10x1 matrix to be copied 4 times into the second 40x1 matrix and then go to the second cell in the 10x1 matrix and copy that value 4 times in the 40x1 matrix and so on until this has been done for all values in the 10x1 matrix. Please let me know if there is a way to do this. Thank you

==================

A_40x1 = kron(ones(4,1),A_10x1);



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.