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: Convert 2d matrix into several 1 D array
Replies: 5   Last Post: Dec 31, 2012 12:11 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
eletronica.1234

Posts: 1
Registered: 12/24/12
Re: Convert 2d matrix into several 1 D array
Posted: Dec 24, 2012 5:59 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

is very simple convert a n by n matrix in several vectors.

you should use the following code

b1 = a(1,:);
b2 = a(2,:);
b3 = a(3,:);


if you want to extract the column, not the rows, you should use

b1 = a(:,1);
...



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.