Question: using For Loop Write a MATLAB code that gives the same result as code below y = 1; while y
using For Loop Write a MATLAB code that gives the same result as code below
y = 1;
while y<=5
z = y;
fprintf ('z = %d ',z)
y = y +1;
end
#Note : the code will print numbers from 1 to 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
