From: forkandwait w on

> I'm not sure if I know how to teach it.

Darn it ;)

> To solve such problems it's important that you know how MATLAB stores
> the numbers in an array. The operation X(:) will turn any array X into
> a column vector without moving any numbers so that's a good way to
> explore and try things. Also, reshape will change the size of an array
> without moving anything. The operators .' (transpose) and permute
> (transpose is really just permute(X,[2 1]) ) will move numbers around so
> play with them and see what happens.

Yeah, I am at that stage already. There are a lot of resources which explain first steps (this is a transpose, this is how matlab stores data ...), or which throw around permute and reshape as if they were obvious, but not many worked examples in the middle.

(I think this is a pretty common lack actually in documentation, and one of the reasons the "cookbook" O Reilly series is so successful).

> Maybe it's possible to formalize what I did, but I just did it
> intuitively. It helps that I've been using MATLAB for more than 20
> years.

Well, thanks for the help, and if you ever do formalize it, write a book.
>
> --
> Doug Schwarz
> dmschwarz&ieee,org
> Make obvious changes to get real email address.