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
Margarita [4]
1 year 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:
MrMuchimi1 year 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 drop 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
In three to five sentences, explain how you would insert graphics using your word-processing software.
madam [21]
Most word-processing programs allow the user to select a command from the menu to insert a graphic. Clicks in the document where you want your file, choose insert and picture click from file select the image the press open and you picture will become inserted in to the document.
3 0
2 years ago
Read 2 more answers
How efficient would a 6-bit code be in asynchronous transmission if it had 1 parity bit, 1 start bit, and 2 stop bits?
Lana71 [14]
How efficient well if we are transmitting 6bits and we need 10 to transmit the 6 bits that would be 6/10 = .6 = 60% efficient.
7 0
1 year ago
Which of the following statements is incorrect? An operating system provides an environment for the execution of programs. An op
rosijanka [135]

Answer:

command line and graphical user interface

Explanation:

there were (and still are) operating system with no graphical user interface at all, as for example some Unix releases

8 0
1 year ago
C# Write, compile, and test a program named PersonalInfo that displays a person’s name, birthdate, work phone number, and cell p
Soloha48 [4]

Answer:

#include <stdio.h>

#Include<iostream>

using namespace std;

//Define required function

PersonalInfo( )   {

    printf("Name   : Robert Josh\n");  

    printf("DOB    : July 14, 1975\n");  

    printf("Work Phone : 00-00000000\n");  

    printf("Cell Phone : 11-777777777\n");  

    return(0);  

 }

int main()   {

    //Call function

 PersonalInfo( );

 return 0;

 }

Explanation:

Its just a simple code to print required details when the function PersonalInfo is called.

5 0
2 years ago
To use the Web, each client computer requires a data link layer software package called a Web browser. True False
Luden [163]

Answer:

The answer is "False"

Explanation:

The data link layer is the protocol layer within a program, which controls data movement into a physical wireless connection. This layer is a second layer, that is also known as a collection of communications applications.

  • The server network, in which many clients request, and receive service from a centralized server.
  • This system provides an interface, that enables a user to request server services and view the server returns results, that's why it is wrong.
6 0
1 year ago
Other questions:
  • Social networking sites like Office Online, PayPal, and Dropbox are used to develop social and business contacts.
    6·2 answers
  • When should a technician record a system's baseline data?
    10·1 answer
  • Which feature of Badoo helped members make their profile more prominent?
    14·1 answer
  • Because of the density of vehicle in urban areas, you should ____.
    8·2 answers
  • Carrie works on a help desk and is assigned a ticket that was automatically generated by a server because of an error. The error
    5·1 answer
  • What are the advantages and disadvantages of using a very large memory cell size, say, W = 64 instead of the standard size W = 8
    15·1 answer
  • For drivers under 21, the penalties for driving with an illegal BAL include _____.
    5·2 answers
  • In this exercise, you will create a couple of helper methods for ArrayLists in a class called ArrayListMethods.
    10·1 answer
  • Let's revisit our lucky_number function. We want to change it, so that instead of printing the message, it returns the message.
    10·1 answer
  • The dealer's cost of a car is 85% of the listed price. The dealer would accept any offer that is at least $500 over the dealer's
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!