I want to use matlab to plot in different time-steps an agent who is moving to different places in this structure:
pgon = polyshape([-0.5 -0.6882; 0.5 -0.6882; 0.5 -1.6882;-0.5 -1.6882]);pgon2 = polyshape([0.5 -0.6882; 0.806 0.2629; 1.7571 -0.0431;1.4511 -0.9972]);pgon3 = polyshape([0.806 0.2629; 0 0.8507; 0.5878 1.6567;1.3938 1.0689]);pgon4 = polyshape([0 0.8507; -0.809 0.2629; -1.3968 1.1136;-0.5878 1.6597]);pgon5 = polyshape([ -0.809 0.2629; -0.5 -0.6882; -1.4511 -0.9972;-1.7601 -0.0461]);plot([pgon1 pgon pgon2 pgon3 pgon4 pgon5]);axis equal;
Now I have an array of positions for these 6 cells and I want to put this sturcture (if it is possible) as different slices in an axis so for N=20 then I can color code where my agent stands in this structure at each n. It would be like a 3D structure that allows me to see the positions in each n=1,..,20 in this plotted structure. Is it possible to do it?
Best Answer