Sunday, May 18, 2008

Assignment #4

Assignment #4
1. ones(256,1)
2. [0:1:255]
3. [0:1:255]'
4. ones(256,1)*[0:1:255]
5. [0:1:255]'*ones(1,256)
6. zeros(256)
7. ones(256)
8. 128*ones(256)
9. zeros(256)
10. imshow(ones(256,1)*[0:1:255]/255)


11. x(:,:,1)=[ones(256,1)*[0:1:255]/255]';
x(:,:,2)=zeros(256);
x(:,:,3)=[ones(256,1)*[0:1:255]/255];
imshow(x)
RB Face

12. x(:,:,1)=[ones(256,1)*[0:1:255]/255]';
x(:,:,3)=zeros(256);
x(:,:,2)=[ones(256,1)*[0:1:255]/255];
imshow(x)

RG Face

13.x(:,:,1)=zeros(256);
x(:,:,2)=[ones(256,1)*[0:1:255]/255]';
x(:,:,3)=[ones(256,1)*[0:1:255]/255];
imshow(x)

GB Face

14. x(:,:,1)=[ones(256,1)*[0:1:255]/255];
x(:,:,2)=ones(256);
x(:,:,3)=[ones(256,1)*[0:1:255]/255]';
imshow(x)

CY Face


15. x(:,:,1)=[ones(256,1)*[0:1:255]/255]';
x(:,:,2)=[ones(256,1)*[0:1:255]/255];
x(:,:,3)=ones(256);
imshow(x)

CM Face

16.x(:,:,1)=ones(256);
x(:,:,2)=[ones(256,1)*[0:1:255]/255]';
x(:,:,3)=[ones(256,1)*[0:1:255]/255];
imshow(x)

YM Face

17. Spectrum Cube

















18. Facebook Spectrum















19. a=[1,1,0,0;1,0,1,0;0,0,1,1]
a=
1 1 0 0
1 0 1 0
0 0 1 1
circshift (a,[0,-1])
1 0 0 1
0 1 0 1
0 1 1 0

20. a=[1,1,0,0;1,0,1,0;0,0,1,1]
circshift (a,1)
0 0 1 1
1 1 0 0
1 0 1 0

21.


22.


No comments: