Question: Without using MATLAB, predict the output in the command window for variable d after the FOR loop. clear; clc c = 1 ; d =

Without using MATLAB, predict the output in the command window for variable d after the FOR loop.
clear; clc
c =1;
d =2;
n =3;
for m =1:3
if (m <= n)
d = d +1;
end
end
d

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 Programming Questions!