1answer.
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]
3 years 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:
MrMuchimi3 years 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
(asking again because point-hogs exist)
yawa3891 [41]

The answer is 2-to-the-power-of-n, since for every input, the number of different combinations doubles. From your list I think answer A is meant to indicate 2ⁿ.

6 0
3 years ago
What are some ways to manage stress? Check all that apply.
Romashka-Z-Leto [24]
Exercise Breathe deeply Take breaks Study at night
7 0
3 years ago
Read 3 more answers
How long is the bachelor's program at Eth Zurich? 3 or 4 years?
natulia [17]
The bachelor's program at Eth Zurich is 3 years.
I hope this helps!
:-)
4 0
3 years ago
In pseudocode you can use the _________ library function to determine whether a character is an alphabetic letter.
Sunny_sXe [5.5K]

Answer:  isalpha()

Explanation:

isalpha() is the library function that is used for algorithm and programs for checking whether the given character is alphabet or any other character such as numbers,etc.It can take a integer value for checking character and then return a integer value.

  • The passed character for checking gets converted into integer form for evaluation.If the returned integer is zero then ,given character is not alphabet otherwise a non- zero return value indicated alphabet.
  • isalpha() Function Prototype :-int isalpha(int argument);

6 0
3 years ago
When starting a computer running Windows Vista, a technician sees that the error message "BOOTMGR is missing" appears after the
docker41 [41]

Answer:

B and C

Explanation:

Possible solution to solving "BOOTMGR is missing" error in Windows Vista is to use the Windows Recovery Environment.

Another option is to run "bootrec/fixboot" command from the comman prompt and the command prompt is also accessible from the windows recovery environment.

8 0
3 years ago
Other questions:
  • Trading your bicycle for a snowboard exemplifies ?
    15·1 answer
  • _____ is the network protocol that deals with the routing of packets through interconnected networks to the final destination.
    9·1 answer
  • SecOps focuses on integrating the need for the development team to provide iterative and rapid improvements to system functional
    11·1 answer
  • What is the importance of internet safety?
    11·1 answer
  • In your own words describe the benefits of creating functions in your code
    12·1 answer
  • While using a web-based order form, an attacker enters an unusually large value in the Quantity field. The value he or she enter
    15·1 answer
  • Select the correct answer.
    6·1 answer
  • Wap to calculate the simple interest for the given PTR​
    14·1 answer
  • In java complete a program that takes a weight in kilograms as input, converts the weight to pounds, and then outputs the weight
    15·1 answer
  • Lucy wants to access the webpage. She is using her computer to access the webpage. What types of information will be in one fram
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!