% Logarithmic Transformation of an image

i=imread(‘asd.jpg’);
g=rgb2gray(i);
c=input('Enter the constant value, c = ');
[M,N]=size(g);
        for x = 1:M
            for y = 1:N
                m=double(g(x,y));
                z(x,y)=c.*log10(1+m);
            end
        end
subplot(1,2,1),imshow(i);

subplot(1,2,2), imshow(z);