Question: 6. Look at the following sample of MATLAB code (which has line numbers added for ease of reference) and answer the following questions about it.

6. Look at the following sample of MATLAB code (which has line numbers added for ease of reference) and answer the following questions about it. total - 0; for k - 1:15 total = 7***2 - 2** + total; end disp('The sum for 15 terms is:') disp (total) 5 6 a) Specify the main MATLAB feature that is used in this sample [3 marks] b) How many times calculation in the closed loop will be executed if you run this code? [3 marks] 7. Name two MATLAB conditional statements. [3 marks) 8. Name two MATLAB loops and write the basic general structure for one of them. [3 marks) 9. Write the following equations in matrix form. xi(k+1) = C11X1(k) + a(k) xz(k+1) = C21x1(k) + C22x2(k) + d(k) x3(k+ 1) = C32x2(k) + C33x3(k) x (k+1) = C12X3(k) + Cesxs(k) where Cy are coefficients, and a(k), and d(k) are constants [4 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
