Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % A=zeros([3,3])
- % % a=0;b=500;
- % % A=a+(b-a)*randn(500,500);
- % figure,imshow(A);
- %
- % a=[1 2 3 4 5 6 7 8 9]
- % b=a+2
- % plot(b)
- % grid on
- % plot(b,'*')
- % axis([0 10 0 10])
- %
- % n=10
- % a=rand(n)
- % A=imagesc(a)
- % colormap(gray)
- % axis square
- %
- % b = inv(a)
- % imagesc(b);
- % c=a*b
- % imagesc(c);
- % axis square
- % A=[ 1 2 0 ; 2 5 -1; 4 10 -1]
- % B=A'
- % c=A*B
- % C=A.*B
- % eig(A)
- % svd(A)
- % t=(100:10:200)'
- % n = length(t)
- % [r c]=size(t)
- % A= magic(4)
- % A(4,2)
- % sum(A(1:4,4))
- % sum(A(:,2))
- % B=A;
- % B(1:3:16)=-10
- % A=5:5:50
- % B=[1 3 6 7 10]
- % A(B)
- % A=[1 2 3;4 5 6; 7 8 9]
- % B=logical([0 1 0; 1 0 1; 0 0 1])
- % A(B)
- % A=rand(5)
- % A(A>0.5)=0
- %
- % k=10;
- % a=zeros(k,k)
- % for m= 1:k
- % for n = 1:k
- % a(m,n)=1/(m+n-1)
- % end
- % end
- % a
- % eps=1;
- % while(1+eps)>1
- % eps=eps/2;
- % end
- % eps=eps*2
- % I= imread('football.jpg');
- % imshow(I);
- % sum(I);
- % j=rand(400,600)
- % imwrite(j,'rand_image.jpg');
- % [r c] = size(j);
- % A =size(j);
- % m=zeros(2,3);
- % v=ones(1,3);
- % m=eye(3)
- %
- % v=[1 2 5]
- % v(3)
- %
- % m = [1 2 9; 4 5 6]
- % m(1,3);
- % m(2,:);
- % m(1,:);
- % m(:,1);
- % m(:,2);
- % size(m);
- % size(m,1);
- % size(m,2);
- % m1=zeros(size(m));
- % who
- % whos
- % a = [1 2 3 4]
- % b=[5 6 7 8]
- % a .^ 2;
- % a.*b
- % c=a./b
- % round(c)
- % a = [1 4 6 3]
- % sum(a)
- % mean(a)
- % var(a)
- % std(a)
- % max(a)
- % a = [1 2 3; 4 5 6]
- % a(:)
- % mean(a)
- % max(a)
- % max(max(a))
- % max(a(:))
- % v = [3 5 -2 5 -1 0] ; % 1: FOR LOOPS
- % u = zeros( size(v) ); % initialize
- % size(v,6);
- % for i = 1:size(v,2) % size(v,2) is the number of columns
- % if( v(i) > 0 )
- % u(i) = v(i);
- % end
- % end
- % u
- % v = [3 5 -2 5 -1 0] % 2: NO FOR LOOPS
- % u2 = zeros( size(v) ); % initialize
- % ind = find( v>0 ) % index into >0 elements
- % u2(ind) = v( ind )
- % figure; % matrices as images
- % m = rand(64,64);
- % imagesc(m)
- % colormap gray;
- % axis image
- % axis off;
- % [i,map]=imread('trees.tif');
- % figure
- % imshow(i,map)
- % I2=ind2gray(i,map);
- % figure
- % imshow(I2) ;
- %
- % figure
- % imagesc(I2,[0 110]) ; % scale data to use full colormap
- % % for values between 0 and 1
- % colormap('gray') ; % use gray colormap
- % axis('image') ;
- %
- % I=imread('football.jpg'); % read a JPEG image into 3D array
- %
- % figure
- % imshow(I)
- % rect=getrect; % select rectangle
- % I2=imcrop(I,rect); % crop
- % I2=rgb2gray(I2); % convert cropped image to grayscale
- % figure
- % imshow(I2)
- % imagesc(I2)
- % figure
- % imshow(I2)
- %
- %
- % colormap('gray')
- % colorbar % turn on color bar
- % impixelinfo % display pixel values interactively
- % truesize % display at resolution of one screen pixel
- % % per image pixel
- % truesize(3*size(I2))
- %
- % I3=imresize(I2,0.5); % resize by 50% using bilinear
- % % interpolation
- % figure
- % imshow(I3)
- % a=imread('football.jpg')
- % imshow(a);
- % b=double(a);
- % figure
- % imshow(b/255);
Advertisement
Add Comment
Please, Sign In to add comment