Question: MATH MODELING USING MATLAB in matlab open up a new script file, type the command and explain line by line what the code is doing
MATH MODELING USING MATLAB
in matlab open up a new script file, type the command and explain line by line what the code is doing ;also run it
x_array = 1:10;
for i = 1:10
if mod (x_array(i),3) == 1
disp( x_array(i) )
elseif mod(x_array(i),3) == 2
disp( -x_array(i) )
else
disp( x_array(i) *10 )
end
end
i have the final output already i just need the explanation of what each line is doing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
