Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can i get an answer for this matlab problems please l It is possible to verify your codes by calling the function in command window

can i get an answer for this matlab problems please

image text in transcribed

l

It is possible to verify your codes by calling the function in command window using the vector A [15, 1, 8, 6, 10, 5 It is possible to verify your codes by calling the function in command window using the vector S [0.5, 0.8, 0.6, 1, 0.4, 0.2] Part 1 Q1. Write a function or script arrival) with input N and A. It asks the user to enter element by element the arrival data value A(1), A(2) A(N) such that values are accepted only if are real between 0 and 8 A loop structure is used to ask entering values. Another nested loop is used to re-enter values they don't respect the given condition 02. Write a function test10 with input a vector A of size N. It returns 1 if all values of A are between 0 and 8 and returns 0 otherwise Part 2 03. Write a function correct) with input: a vector A of size N. It asks the user to correct elements of A that are not between 0 and 8. No test is applied after correction. 04. Write a function test2) with input: a vector A of size N. It returns the number b of bad values inA (i.e not in the interval [, 8]) and a vectors E of size b containing the indexes of bad values in A Part 3 Q5. Write a function interarrival() that returns for a sorted input vector A a vector B such that B(1)-A(1) and B(i) = A(i)-A(1-1) for i>=2 B is called interarrival vector 06. In command window, do the following: -Call the function arrival) to generate arrival vector A with n-10 -Sort A in increasing order - Call the function interarrival) to obtain interarrival vector B Part 4 Q7. Create a function or script service() with input N and S that asks the user to enter element by element the service time values S(1), S(2), S(N) such that values are accepted only if are real betwee 0 and 1.5 A loop structure is used to ask entering values, in which another loop is used to re-enter value if they don't respect the given condition 08. Write a function avgval) with vector S as input. It returns the average value of the vector S 09. Write a function maxval) with vector S as input. It returns the larger value in the vector S

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

Identify and explain four advantages of group counseling.

Answered: 1 week ago

Question

Why is it important to have a code of ethics?

Answered: 1 week ago