%Exercise 6b close all; clear all; clc; %We take 7x13 image, i.e. Is is 13x7 matrix! Is = [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 255 255 255 0 0 0 255 255 255 255 255 0 255 255 255 0 255 255 255 0 255 255 255 255 255 0 0 0 255 255 255 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; %Is = imread('lena.gif','gif'); Is = double(Is); figure(1);colormap(gray(256));image(Is); [h,w] = size(Is); Xline = 1:w; Yline = 1:h; [X,Y] = ndgrid(Xline, Yline);