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: vector/matrix manipulation question
Replies: 3   Last Post: Feb 14, 2013 6:37 PM

Advanced Search

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

Posts: 26
Registered: 8/4/08
Re: vector/matrix manipulation question
Posted: Feb 14, 2013 6:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thank you Bruno!

Permute is exactly what I was seeking for.


For 1. your solutions do work for 2D array. I'm wondering if there is solution for 3D array?

For example, let say
a = [1 2 3; 4 5 6];
b = 2*a;
c(1,:,:) = a
c(2,:,:) = b

c(:,:,1) =
1 4
2 8
c(:,:,2) =
2 5
4 10
c(:,:,3) =
3 6
6 12

The desired output e is

e(:,:,1) =
1 4
2 8
e(:,:,2) =
1 4
2 8
e(:,:,3) =
2 5
4 10
e(:,:,4) =
2 5
4 10
e(:,:,5) =
3 6
6 12
e(:,:,6) =
3 6
6 12



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.