Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

change matrix in matlab

Status
Not open for further replies.

GRIFINA

Junior Member level 1
Joined
Dec 19, 2010
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Indonesia
Activity points
1,369
I have matrix size 2x108x2,and i want convert this matrix to 2x2x108 with matlab program,
Anyone can help me?
Thanks
 

I have matrix size 2x108x2,and i want convert this matrix to 2x2x108 with matlab program,
Anyone can help me?
Thanks


Code:
B=reshape(A,2,2,108);
 

Hi Grifina,

you should specify how the elements are treated in the conversion.
I suppose you want a change in the order of the indices (not a reshape of the array).

Suppose your array is A(a,b,c) [a=2, b=108, c=2 in your case]. What you want is not totally clear because a=c in your case.
If you want to convert it into B(c,a,b) make this:

B = shiftdim(A,2)

If you want to convert it into C(a,c,b) it is a bit more involved.
regards

Z
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top