clear
clc
A=ones(25,25);%create a simple matrix with the dimension required (mXn)
%Here, start changing the matrix C1 as you wish
C1 = zeros(size(A)); % filling First RGB table
for row=1:12
for column=1:12
C1(row,column)=1;
end
end
for row=13:17
for column=13:17
C1(row,column)=0;
end
end
for row=18:25
for column=18:25
C1(row,column)=0;
end
end
C2 = zeros(size(A)); % filling Second RGB table
for row=1:12
for column=1:12
C2(row,column)=0;
end
end
for row=13:17
for column=13:17
C2(row,column)=1;
end
end
for row=18:25
for column=18:25
C2(row,column)=0;
end
end
C3 = zeros(size(A)); % filling Third RGB table
for row=1:12
for column=1:12
C3(row,column)=0;
end
end
for row=13:17
for column=13:17
C3(row,column)=0;
end
end
for row=18:25
for column=18:25
C3(row,column)=1;
end
end
%Define the 3 RGB tables with C1,C2,C3
C(:,:,1)=C1;
C(:,:,2)=C2;
C(:,:,3)=C3;
Z = peaks(25);
surf(Z,C)
title('EXAMPLE')