answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tatuchka
10 days ago
11

Write a MATLAB function named average_of_scores_with_drops The function will have two inputs and two return values. The first in

put will be a list of scores. The second input will be a postive integer representing the number of scores to drop. It will not be larger than the length of the list. Your function should determine the average of the scores after dropping the specified number of lowest scores. The first return value must be a real number equal to the average score. The second return value must be the number of items that were averaged. Notes: Example Test Case: SCORES
Computers and Technology
1 answer:
maria [1K]10 days ago
4 0

Answer:

-%Define the function.

function [avg, ele_left] = average_of_scores_with_drops(input_list, drop_element)

%Sort the list.

input_list = sort(input_list);

%Compute the length of the list.

len_list = length(input_list);

%Declare and initialize the variable.

sum = 0;

%Increase the element to be dropped by 1.

i = drop_element + 1;

%begin the for loop.

for k = i: length(input_list)

%Add the elements.

sum = sum + input_list(k);

%End of the for loop.  

end

%Compute the elements left after dropping the dropped element.

ele_left = length(input_list) - drop_element;

%Compute the average of the elements left.

avg = sum/ele_left;

%End of the function defined.

end

%Run the following code in the command prompt.

%Call the function and return the average

%score and the number of elements

%whose average is computed.

average_score, number_of_items = average_of_scores_with_drops([8 6 1 2 3 5 10], 2)

SAMPLE OF OUTPUT

average_score = 6.40000000000000

number_of_items = 5

You might be interested in
The president of the company wants a list of all orders ever taken. He wants to see the customer name, the last name of the empl
zubka84 [1067]

Response:

refer to the explanation

Clarification:

Examine the SQL statement shown below:

SELECT c.CustomerName, e.LastName, s.ShipperName, p.ProductName, o.Quantity, od.OrderDate

FROM

Customers c, Employees e, Shippers s, Orders o, OrderDetails od, Products p

WHERE c.customerID = o.customerID AND

e.employeeID = o.employeeID AND

o.orderID = od.orderID AND

od.shipperID = s.shipperID AND

od.productID = p.productID;

6 0
1 month ago
Discussion Question 10: A bank in California has 13 branches spread throughout northern California , each with its own minicompu
Harlamova29_29 [1022]
The banking system that poses greater risk of vulnerabilities is the one with ten branches dispersed across California, where data resides on a central mainframe located in San Francisco. If the branches do not share data across the network, the risk of hacking is reduced. However, with a network setup, both data sharing and centralized storage increase exposure to unauthorized access.
3 0
1 month ago
Explain working principle of computer?​
maria [1035]

Answer:

The principle behind how computer systems operate involves a primary machine-based function that remains invisible to us, serving as a control center that changes the input data into output. This central element known as the central processing unit (CPU) illustrates that the operation of computers is quite intricate.

Explanation:

5 0
1 month ago
Access-lists pose a logical problem which often has more than one solution. Can you think of a different set of rules or placeme
maria [1035]
The question is incomplete, as it lacks a diagram of the topology and Router R1's table. I assume the user has access to both the topology and routing information. The configuration below will assist in resolving the ACL issue: Hosts within the 172.16.0.0/16 network should have unrestricted access to Server1, Server2, and Server3, which is currently not the case since L1 is unable to connect to Server2 or Server3. The suggested configuration on Cisco Router R1 will rectify the ACL issues.
6 0
11 days ago
Which of the following describes ETL? a) A process that transforms information using a common set of enterprise definitions b) A
zubka84 [1067]

Answer:

The right choice is d) All of these options are accurate.

Explanation:

ETL refers to Extract, Transform, and Load. An ETL framework retrieves data from various sources, upholds standards for data quality and consistency, standardizes data so disparate sources can be integrated, and ultimately presents the data in formats suitable for application development and decision-making by end-users.

4 0
1 month ago
Other questions:
  • Why computer is known as versatile and diligent device ?explain​
    14·1 answer
  • Until 2015, each new Roblox user automatically had one friend. What was he called?
    12·2 answers
  • Any software or program that comes in many forms and is designed to disrupt the normal operation of a computer by allowing an un
    13·1 answer
  • A company requires an Ethernet connection from the north end of its office building to the south end. The distance between conne
    8·1 answer
  • Q2 - Square Everything (0.25 points) Write a function called square_all that takes an input called collection that you assume to
    7·1 answer
  • What are the set of rules to move data from one computer to another?
    11·1 answer
  • 7.7 LAB: Using a while loop countdown Write a program that takes in an integer in the range 10 to 100 as input. Your program sho
    11·1 answer
  • Define a function PrintFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand.
    9·1 answer
  • The act of infiltrating a remote computer system is called​
    14·1 answer
  • Return 1 if ptr points to an element within the specified intArray, 0 otherwise.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!