
abc = imread('hw1.jpg');

a = 1
M = [];

while( find( abc(:,:,1) > 1) >= 1 )
   
    abc(:,:,1) = abc(:,:,1) - 5; 
    b = find( abc(:,:,1) <= 1);
    abc(b) = 0;
    imshow(abc);
    M = [M getframe()];
    
end

while( find( abc(:,:,3) > 1) >= 1 )
   
    abc(:,:,3) = abc(:,:,3) - 5;
    b = find( abc(:,:,3) <= 1);
    abc(b) = 0;
    imshow(abc);
    M = [M getframe()];
    
end

while( find( abc(:,:,2) > 1) >= 1 )
   
    abc(:,:,2) =abc(:,:,2) - 5;
    b = find( abc(:,:,2) <= 1);
    abc(b) = 0;
    imshow(abc);
    M = [M getframe()];
    
end

movie(M);
