Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. function plotGround(V,G,PT,i,speed,steps)
  2. subplot(1,2,1);
  3. imagesc(G);
  4. axis equal;
  5. hold on;
  6. plot(PT(:,2),PT(:,1),'ms',...
  7. 'LineWidth',2,...
  8. 'MarkerEdgeColor','k',...
  9. 'MarkerFaceColor','g',...
  10. 'MarkerSize',8);
  11. hold off;
  12. title(['Pedestrians and Ground at step ' int2str(i)]);
  13. subplot(1,2,2);
  14. imagesc(V);
  15. axis equal;
  16. pause(speed/steps);
  17.  
  18. if mod(i,20) == 1
  19. title(['jo ']);
  20. fig = subplot(1,2,1);
  21. imagesc(G);
  22. colorbar; axis equal; hold on;
  23. plot(PT(:,2),PT(:,1),'ms',...
  24. 'LineWidth',2,...
  25. 'MarkerEdgeColor','k',...
  26. 'MarkerFaceColor','g',...
  27. 'MarkerSize',8);
  28. hold off;
  29. title(['Pedestrians and Ground at step ' int2str(i)]);
  30. subplot(1,2,2);
  31. imagesc(V);
  32. colorbar; axis equal;
  33.  
  34. s = ['plot-step' int2str(i) '.png'];
  35. saveas(fig, s)
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement