Question: 4. MATLAB logic - please answer the following questions: (a) What is x at the end of this sequence (10 Points)? for I = 1:6

4. MATLAB logic - please answer the following questions: (a) What is x at the end of this sequence (10 Points)? for I = 1:6 for J - 1:6 if (I - J) x(J) - 1; elseif ((I == 7 - J) & (J > I)) x J) = -1; else x J) = (1+3) / J; end end end (b) Given the following code: x = 1.9; y - 2.3; 1 - 2; j = 3; if z>y b - z/x; elseif z > x b - z/y; else b = z; end w = 6* (3/1); 1-j/k; i. What are w and lif z = 2.36 and k = 1? (5 Points) ii. What are w and lif z = 1.2 and k = 2? (5 Points) iii. What are w and lif z = 2.1 and k = 8? (5 Points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
