1 Write a code for repmat the only builtin commands you are
1. Write a code for repmat; the only built-in commands you are allowed to use are input, size, and disp. The question wants you to write code to do the same thing that repmat command does All of this done in MATLAB
Solution
%%data
Repmata = input( \'Enter data elements a:\ \' );
x = input( \'to repeat your rows:\ \' );
y = input( \'to repear your column:\ \' );
[row,col] = size(a);
for i = 0:x-1
for j = 0:y-1
for r = 1:row
for k = 1:col
b(r+(row*i),k+(col*j)) = a(r,k);
end
end
end
end
