Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Correlation co-efficient between two matrices of different order

Subject: Correlation co-efficient between two matrices of different order

From: Muhammad Shafique

Date: 12 Dec, 2011 12:28:09

Message: 1 of 2

Hi,
I need to:
i) calculate a matrix of correlation coefficients between the column vectors of two matrices, of which A=600*750 dimensions and B=600*830 (the rows are same variables but columns are different variables), and
ii) from the resulting matrix of correlation co-efficients, extract another matrix wherein those elements are set to be 1 which were significantly positively correlated at p<0.01, and 0 otherwise.

Any help will be highly appreciated.

Best regards,
Shafi

Subject: Correlation co-efficient between two matrices of different order

From: Roger Stafford

Date: 13 Dec, 2011 03:34:09

Message: 2 of 2

"Muhammad Shafique" wrote in message <jc4s0p$3c$1@newscl01ah.mathworks.com>...
> Hi,
> I need to:
> i) calculate a matrix of correlation coefficients between the column vectors of two matrices, of which A=600*750 dimensions and B=600*830 (the rows are same variables but columns are different variables), and
> ii) from the resulting matrix of correlation co-efficients, extract another matrix wherein those elements are set to be 1 which were significantly positively correlated at p<0.01, and 0 otherwise.
>
> Any help will be highly appreciated.
>
> Best regards,
> Shafi
- - - - - - - - - -
  You could use corrcoef([A,B]) and then simply discard the unwanted correlations. Perhaps use the second returned argument to obtain the p-values.

Roger Stafford

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us