Question

4. The following coding is from Lesson 18 Worksheet Question 2. 1) [15 points] Make MATLAB code with while loop and the outcome should be the same as for loopcodes.

2) [3 points] by using 1) while loop, write MATLAB codes which will terminate as soon as if statement is met.

Question image 1Question image 2Question image 3Question image 4