"Kate " <chino_tones@hotmail.com> wrote in message <i7u8ku$1h2$1@fred.mathworks.com>...
> Hi guys,
>
> Asking for a bit of help.
>
> I have a matrix :
>
> Matrix = [ 100 200 300 400
> 500 400 600 700
> 800 900 500 200]
>
> I basically want to form a new matrix that looks like:
>
> New_Matrix = [ 500 400 300 400
> 800 900 300 400
> 100 200 600 700
> 800 900 600 700
> 100 200 500 200
> 500 400 500 200]
>
> So basically :
>
> in 'Matrix' , {300 400} maps to {500 400} & { 800 900}
> similarly, {600 700} maps to {100 200) & {800 900}
> and, {500 200} maps to {100 200} & {500 400}
>
>
> I'd like to be able to get some help in creating a solution to form the "New_Matrix".
> Please note that in my dataset , the input data , i.e. "Matrix", has potential to be large , so my code can't be limited to the example "Matrix" I used here.
>
> thanks
> kate
       
When it comes to larger matrices, you need to explain how your "mapping' generalizes. Do you always have four columns or is the number of columns even? Do you care about the order of rows in New_Matrix? If your matrix has n rows, will New_Matrix always have n*(n1) rows? Questions of that kind.
And finally can you show us what you have already done to solve this problem? Providing you help should not be the same thing as doing it all for you in a tidy package.
Roger Stafford
