Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedUsing 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions