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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!