colormap('copper')
imagesc(resPval)
for i=1:3
for j=1:length(betaVal)
Pstr=num2str(resPval(i,j),8);
if resHval(i,j); Hstr='H_o Rejected'; col='b'; else Hstr='H_o Accepted'; col='r'; end
text(i,j,{Pstr,Hstr},...
'HorizontalAlignment','center',...
'VerticalAlignment','middle',...
'BackgroundColor','w',...
'Color',col);
end
end
set(gca,'YTick',1:length(betaVal),'YTickLabel',colNames,'XTick',1:3,'XTickLabel',rowNames(1:3))
1 Comment
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/182008-wrong-color-showed-by-imagesc-function-what-am-i-doing-wrong#comment_270528
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/182008-wrong-color-showed-by-imagesc-function-what-am-i-doing-wrong#comment_270528
Sign in to comment.