Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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 (nStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started