28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2ipermute<br />

Purpose Inverse permute the dimensions of a multidimensional array<br />

Syntax A = ipermute(B,order)<br />

ipermute<br />

Description A = ipermute(B,order) is the inverse of permute. ipermute rearranges the<br />

dimensions of B so that permute(A,order) will produce B. B has the same<br />

values as A but the order of the subscripts needed to access any particular<br />

element are rearranged as specified by order. All the elements of order must<br />

be unique.<br />

Remarks permute and ipermute are a generalization of transpose (.') for<br />

multidimensional arrays.<br />

Examples Consider the 2-by-2-by-3 array a:<br />

See Also permute<br />

a = cat(3,eye(2),2*eye(2),3*eye(2))<br />

a(:,:,1) = a(:,:,2) =<br />

1 0 2 0<br />

0 1 0 2<br />

a(:,:,3) =<br />

3 0<br />

0 3<br />

Permuting and inverse permuting a in the same fashion restores the array to<br />

its original form:<br />

B = permute(a,[3 2 1]);<br />

C = ipermute(B,[3 2 1]);<br />

isequal(a,C)<br />

ans=<br />

1<br />

2-1217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!