MATLAB: Image processing, data stimulation

image processing

hi, i want to generation an matrix that simulate an image of size 198*211*3 so i used this code:
clc
close all
clear all
for i=1:4;
for j=1:4;
x(i,j)=rand*100;
if x(i,j)>=0 && x(i,j)<=255;
x
end
end
end
is this work correct? thank you

Best Answer

x = randi([0 255], 198, 211, 3, 'uint8');