How to use one matrix to constrain another matrix of the same size?
Mostrar comentarios más antiguos
I am doing pairwise correlation analysis and ran into the following problem. I have a n by n matrix of p values and a corresponding n by n matrix of r. I want to keep every entry in the r matrix that has a p value less than 0.01, and make all the other entry either 0 or NaN. In other words, I have matrix A and B; if Ai,j then keep Bi,j; if Ai,j=0.01, then Bi,j=0. Can someone please help me with how to code this? Thank you!!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre NaNs en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!