2 pattern printing on matlab. Can i get the codes?
kx*x**x**x kxx kx kx We were unable to transcribe this imageShow transcribed image text kx*x**x**x kxx kx kx
Solution
for i = 10:-1:1
for j = 1:i
fprintf(“*”);
end
for j = 1:2*(10-i)
fprintf(” “);
end
for j = 1:i
fprintf(“*”);
end
fprintf(“n”);
end
n
OR
OR