📄 drawquadblocks.m
字号:
% % draw square quad blocks of quadtree in eight basic colors.
% % S: Sparse matrix that holds quadtree information
function drawquadblocks(S)
mycol = strvcat('r','y','g','c','b','m','k','w');
[i,j,v]=find(S); %i,j are indices, v is value (i.e. block size) at (i,j)
figure, hold on
for k=1:length(v)
M = mod(k-1,length(mycol))+1;
fillrect_ulwh([j(k),i(k)],v(k),v(k),mycol(M));
end
axis tight
% % -------------------------------------------------------------------------
% % This program or any other program(s) supplied with it does not provide any
% % warranty direct or implied. This program is free to use/share for
% % non-commercial purpose only, for any other usage contact with author.
% % Kindly reference author.
% % Thanking you.
% % @ Copyright M Khan
% % Email: mak2000sw@yahoo.com
% % mak2000@GameBox.net
% % http://www.geocities.com/mak2000sw
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -