Kx X X X Kxx Kx Kx Q37026299

2 pattern printing on matlab. Can i get the codes?kx*x**x**x kxx kx kx

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


Your Code 1 for i10:-1:1 for j 1:i 4 fprintf(*; end for j fprintf( ); 1:2*(101) = end 10 12 13 14 15 16 end 17 fprintf(*;

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

Your Code 2 for i-1:n j fprintf( ) for 1:n-1 = 4 end fprintf(*) end fprintf(n) 10 end Result... executed in 8.922 sec(s)

n

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.