Array indexing-show wrong outputs
Show older comments
Hi I have this part of code
[row,col] = GrubbTest(CD_data_fem(:,2:end))
X=cell2mat(CD_data_fem(:,2:end))
XX = reshape(strtrim(cellstr(num2str(X(:)))), size(X));
XX(row,col) = strcat('<html><body bgcolor="FF5500" width="50px">', XX(row,col));
set(handles.uitable1,'Data',[PN_Female XX]);
row and col variable give me :
row =
25
25
25
19
25
col =
4
6
8
9
9
It color good cells but with some extra(wrong),especialy row 19 col 4,6 and 8

Any ideas? thank you Danny
Accepted Answer
More Answers (0)
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!