Question: MATLAB: rewrite the following code using while loops instead of for loops, use MATLAB coding. needs to display the same outputs for matrix A n=
n= randi ([4,8]);%n is the size of the square mat for loop (i) A=zcos(n,n) for i=1:n for j=1:n A(i,j)=i+j end end A for loop (ii)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
