In matlab, how to make a avi that sequentially fills square.

1 view (last 30 days)
To make a code like .gif(actually .avi) first, i make a code like this to divide room.
close all;
figure;hold on;
plot([0,8],[0,0],'black');
plot([0,8],[8,8],'black');
plot([0,0],[0,8],'black');
plot([8,8],[0,8],'black');
plot([2,2],[0,8],'black');
plot([4,4],[0,8],'black');
plot([6,6],[0,8],'black');
plot([3,3],[0,8],'red');
plot([5,5],[0,8],'red');
plot([0,8],[2,2],'black');
plot([0,8],[4,4],'black');
plot([0,8],[6,6],'black');
plot([0,8],[3,3],'red');
plot([0,8],[5,5],'red');
axis equal;
xlim([-1,9])
ylim([-1,9])
set(gca,'xtick',[-1:1:9])
set(gca,'ytick',[-1:1:9])
but i don't know what to do next to make a code that sequentially fills square. could you help me?

Accepted Answer

Image Analyst
Image Analyst on 26 Nov 2016
The attached demo may help you.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!