From: Jacob Mick on
"Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <i10guk$f95$1(a)fred.mathworks.com>...
> "Jacob Mick" <jam7w2DELETETHISTEXT(a)mail.missouri.edu> wrote in message <i10ash$o6q$1(a)fred.mathworks.com>...
> > Thanks for the reply! That didn't quite do what I wanted though. y(b) =/= 9 always
> >
> > B=
> > (9,9) 56
> > (10,9) 56
> > (11,9) 40
> > (12,9) 47
> > ...
> > (9,10) 56
> > (10,10) 42
> > (11,10) 35
> > ...
> > (288,400) 4
> > (396,400) 10
> > (397,400) 52
> > (398,400) 99
> > (399,400) 36
> > (400,400) 72
> - - - - - - - -
> How about
>
> C = B(A,A);
>
> This assumes that A is a permutation of 1:400. I am guessing here because your explanation is far from clear.
>
> Roger Stafford

Sorry for the unclear explanation. I want matrix C to have the values of B but be numbered according to cells of A.

matrix A
[1] = x
[2] = y
[3] = z

matrix B
[x,y] = r
[x,z] = n

matrix c
[1,2] = r
[1,3] = n


I'm trying to derive information from the statistical coupling matrix of a protein, by looking at the coupled residues that don't appear in the contact map.

Matrix A is my matrix used for translating the sequence alignment used in the SCA to a well studied protein's sequence.

Matrix B is the contact map of the well studied protein.
From: Walter Roberson on
Jacob Mick wrote:

> Sorry for the unclear explanation. I want matrix C to have the values of
> B but be numbered according to cells of A.
>
> matrix A
> [1] = x
> [2] = y
> [3] = z
>
> matrix B
> [x,y] = r
> [x,z] = n
>
> matrix c
> [1,2] = r
> [1,3] = n

sub2ind() or equivalent computation seems appropriate.