g=imread('peppers.png'); imshow(g) figure imshow(255-g) ??? Error using ==> - Function '-' not defined for variables of class 'uint8'. imshow(uint8(255-double(g))) imshow(255-double(g)) delfigs imshow('mart.png') edit contrst contrst profiles figure(1) profiles stretchi stretch(5,25) stretch(60,90) delfigs g=imread('peppers.png'); imhist(g) g=imread('mart.png'); imhist(g) figure imshow(g) f=imhist(g); whos f Name Size Bytes Class f 256x1 2048 double array Grand total is 256 elements using 2048 bytes figure plot(f) h=cumsum(f); figure plot(h) plot(h/length(g(:))) plot(255*h/length(g(:))) delfigs heqdemo exit