MatlabNotes - CBU statistics Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
In thi sntence, what word is mad fro the mising letters?

location: MatlabNotes

Some Jottings Related to MATLAB

Manipulating Arrays

reshape

shiftdim

shiftdim allows one to do generalised tranposition. If A is a matrix then shiftdim(A,1) is equal to A'. In fact the 1 can be any odd number; since transposition is of order 2 an even number will leave A unchanged.

>> A=reshape(1:12,3,4)

A =

     1     4     7    10
     2     5     8    11
     3     6     9    12

>> shiftdim(A,3)

ans =

     1     2     3
     4     5     6
     7     8     9
    10    11    12

>> shiftdim(A,6)

ans =

     1     4     7    10
     2     5     8    11
     3     6     9    12

circshift

http://www-h.eng.cam.ac.uk/help/tpl/programs/Matlab/faster_scripts.html

http://www-h.eng.cam.ac.uk/help/tpl/programs/Matlab/tricks.htm