I read in a matrix from xls file. The matrix is as follows
pvalue = [ NaN NaN NaN NaN; NaN NaN 1.00000000000000e-05 NaN; NaN 4.00000000000000e-05 0 NaN; NaN 0 0 NaN; NaN NaN NaN NaN];
All the NaN are empty elements in the excel file. I want to plot the pvalue using imagesc and indicate the empty elements as the background colour. However, Matlab treats the NaN as the minimum value (0) and indicates those 'NaN' positions blue on the plot. Is there a way that I can plot the 'NaN' elements as the background colour and only plot those elements that I have value with?
Hope I made the question clear. Thank you very much, Wendy