how to find correlation between two columns, selecting rows on the basis of third column
Ältere Kommentare anzeigen
Hi
I have three column data say A, B and C and the number of rows be 1000. Column A is either empty or it has values from 1 to 3 randomly. B and C are two variables. Let's say values of B and C in each row is a case and value of A in the same row assigns the category to that case. So there are (1+3)four categories of cases in b and C. I need to find correlation between B and C with in each category.
Any idea how to do that?
Akzeptierte Antwort
Weitere Antworten (1)
Muhammad
am 28 Mär. 2012
3 Kommentare
Muhammad
am 28 Mär. 2012
David Young
am 28 Mär. 2012
See above. Is A a cell array?
The code in my answer above gives you exactly what you are asking for, when the category has a number.
If this still doesn't help, perhaps you can show the code that assigns values to the variables A, B and C. (They are variables in MATLAB, aren't they?)
Muhammad
am 29 Mär. 2012
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!