matrix with different sizes for ranksum test

Hello,
I have two matrix of A (9*15) and B (13*16) and would like to test if there are significantly different.
A=A(:)
B=B(:) and then use
[p, h, stats] = ranksum (A,B).
is this the right way?
Thanks

 Accepted Answer

It is the correct approach under the assumption that the structure of A and B do not matter, that the properties of the array elements are independent of position.
That is a valid assumption at times, but in other cases it is not valid at all. For example if A represents student test scores in one class, then the median for each different test could be different and so which row (or column) a value is in could be important.

2 Comments

Thanks.
if A represent energy of some specifc lamps in diferent dates and B represent the energy of some other lamps in some other dates, how can run the ranksum between A and B?
Roxan
The code you posted looks like it would be ok for that.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!