Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% some data...
- % random image
- Image = rand(200,400);
- % 900 lines of random color
- color1 = rand(1,900);
- color2 = rand(2,900);
- color3 = rand(3,900);
- % some positions
- x = 31:60;
- y = 31:60;
- [X,Y] = meshgrid(x,y);
- %% plot process
- % plot Image (with 'imshow' or 'imagesc')
- imshow(Image);
- hold on;
- % plot the lines (with 'line' or 'plot')
- for i = 1:900
- line([X(i), X(i)+1],[Y(i),Y(i)+2],'color',[color1(i),color2(i),color3(i)]);
- if i == 100 % nothings happens to background image after 100 vectors
- pause();
- elseif i == 200 % gradually starts to change...
- pause();
- end
- end
- % ... at the end it is completely erased
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement