Question: Using matlab. PLease write what each script command does. Step by step. 1) (20 points) Write the screen display for the following script and associated

Using matlab. PLease write what each script command does. Step by step.Using matlab. PLease write what each script command does. Step by step.

1) (20 points) Write the screen display for the following script and associated function in the space provided. For this question assume each output is put on one line and there are no blank lines between the outputs. You may not need all the lines provided. Credit only given for work shown. % script clear; disp ('Begin problem 1'); a-[1 -2 2 0 -3 3 4]; b-[-1 2 -3 4 -5 6 -11 C-0; n-7; m-b (n) Display # Displa 2 3 4 5 6 7 8 while n> 0 [m,n] -confusel (m, n,a,b) end disp (['Number of loops is ',num2str (c)]) disp ('bye bye') function [m, n] confuse! (n, n, a , b) = if m>4 10 disp ('Branch 1') temp-a (n-1) *b (n+1); n-n-5; disp ('temp) elseif (n 0 [m,n] -confusel (m, n,a,b) end disp (['Number of loops is ',num2str (c)]) disp ('bye bye') function [m, n] confuse! (n, n, a , b) = if m>4 10 disp ('Branch 1') temp-a (n-1) *b (n+1); n-n-5; disp ('temp) elseif (n

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