Draw Shape Using Matlab Loops Matlab Q37111531

how can I draw this shape using MATLAB (loops) MATLABONLY!!
Question 2Question 2 Show transcribed image text Question 2


Answer


for i=1:5 for j=1:5 if j == 1 || j == 5 || i == j || i == 6-j fprintf(“* “) else fprintf(” “) end end

OR
OR

Leave a Comment

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