Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
for unequal matrix size
  • Loading branch information
Junpeng Lao committed Oct 11, 2016
1 parent e510ee0 commit 45a6d52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imap_utilities/imsqrmat.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
% display result
textStrings = num2str(mat(:),'%0.2f'); % Create strings from the matrix values
textStrings = strtrim(cellstr(textStrings)); % Remove any space padding
[x,y] = meshgrid(1:size(mat,1)); % Create x and y coordinates for the strings
[x,y] = meshgrid(1:size(mat,2),1:size(mat,1)); % Create x and y coordinates for the strings
hStrings = text(x(~isnan(mat(:))),y(~isnan(mat(:))),textStrings(~isnan(mat(:))),... % Plot the strings
'HorizontalAlignment','center');
midValue = mean(get(gca,'CLim')); % Get the middle value of the color range
Expand Down

0 comments on commit 45a6d52

Please sign in to comment.