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
statuscvo [17]
3 years ago
6

Write a function called normalizeGrades that receives a row array of test scores of arbitrary length and positive values, and pr

oduces two outputs: A row array array containing the grades normalized to a linear scale from 0 to 100 (i.e. grades are normalized if the maximum grade equals 100). Hint: Use the internal function max. The average of the normalized grades. Hint: Use the internal function mean. Restriction: Loops may not be used. For example, following code: scores=[90, 45, 76, 21, 85, 97, 91, 84, 79, 67]; [normScores,average]=normalizeGrades(scores) produces: normScores=[92.78, 46.39, 78.35, 21.65, 87.63, 100, 93.81, 86.6, 81.44, 69.07] average= 75.77 Function Save Reset MATLAB DocumentationOpens in new tab function [ output_args ] = untitled( input_args ) % Takes a row array of test scores (arbitrary length, and positive values) % and produces two outputs: % grades: A row array grades containing normalized grades scores on a linear scale from 0 to 100. % average: A numeric number equaling the average of the normalized scores. % end 1 2 3 4 5 6 7 8 9 Code to call your function Reset % test dataset, use randi to generate others scores=[90, 45, 76, 21, 85, 97, 91, 84, 79, 67]; [ normScores, average ] = normalizeGrades( scores ) 1 2 3 Run Function
Computers and Technology
1 answer:
Lynna [10]3 years ago
4 0

Answer:

function [normScores, average] = normalizeGrades(scores)

 

   m=max(scores);

   normScores=(scores./m)*100;

   average=mean(normScores);

end

scores = [90, 45,76,21,85,97,91,84,79,67];

[normScores, average] = normalizeGrades(scores)

Explanation:

  • Normalize the given scores to a linear scale from 0 to 100  and find the average of normalized scores .
  • Find the maximum score in the given scores  and normalize each score, using the maximum score, between 0 to 100 .
  • Find the average of normalized scores using mean .
  • Test the data set .
You might be interested in
In what year was the first phone using the android operating system sold in the united states?
inn [45]
In 2008 was when the first android operating system was sold in the United States.
8 0
3 years ago
Which layer of the OSI model is responsible for ensuring flow control so that the destination station does not receive more pack
MrMuchimi

Answer:

The Layer 4 (Transport layer)

Explanation:

The transport layer is the fourth layer of the OSI (Open Systems Interconnection) model that is responsible for transmitting data between networking devices. Some of its other functions are;

i. It maintains flow control so that the destination station does not receive more packets than it can handle or process at a particular time.

ii. it also maintains error control so that the entire message (data) sent arrives at the layer without any error due to incompleteness, loss, damage or duplication.

6 0
4 years ago
Write a program to prompt the user for hours and rate per hour using input to compute gross pay. Pay the hourly rate for the hou
Nuetrik [128]

Answer:

Following is the program in the python language

hr = input("input hours:") #Read input by user

h1 = float(hr)

rate =input("Input Rate:") #Read RATE BY USER

r1 = float(rate) #CONVERT INTO FLOAT

if h1 <= 40: #check condition

   t=h1 * r1

   print (t) #DISPLAY

else :#else block

   t1=(40 * r1) + (h1 -40) * r1 * 1.5

   print('The pay is :')

   print(t1)#DISPLAY

Output:

input hours:45

Input Rate:10.50

The pay is :

498.75

Explanation:

Following are the description of program

  • Read the value of hour in the "hr" variable and convert into the float value in the "h1" variable .
  • Read the value of rate in the " rate" variable and convert into the float value in the "r1" variable .
  • After that check the condition of hour if block if the hour is less then or equal to 40 then it multiplied h1 *t1 otherwise else block will be executed and print the value of pay .

5 0
4 years ago
Hymter. Wants to workin The Energy career field with electrical energy
m_a_m_a [10]

Answer: what is the question

Explanation:

3 0
3 years ago
In a text messaging system, data is sent from one device to another. Devices are recognized by a unique device ID. The format of
Oliga [24]

Answer:

public int wordCount() {

       String[] arr = textMsg.split(" ", 0);

       return arr.length();

   }

public boolean isValid() {

       if (idLength == deviceID.length()) {

           if (msgLength == textMsg.length()) {

               return true;

           } else {

               return false;

           }

       return false;

   }

Explanation:

The Java source code defines two methods in a class named Message namely; isValid() and wordCount(). The isValid() method evaluates the validity of a message sent to return a boolean value while the wordCount() counts and returns the number of words in the message.

4 0
3 years ago
Other questions:
  • Which of the following best explains why some people invest their saving in the stock market and others put their saving in bank
    5·2 answers
  • Recursion is memory-intensive because ________. Select one: a. it requires large data values b. it must occur numerous times bef
    11·1 answer
  • What is the purpose of a search engine?
    10·2 answers
  • What age group is experiencing the most growth in social media
    13·1 answer
  • Microsoft word 2016
    14·1 answer
  • In a stream channel what is deposited first?
    7·1 answer
  • While trying to solve a network issue, a technician made multiple changes to the current router configuration file. The changes
    11·1 answer
  • Write a function called quadruple that quadruples a number and returns the result. Then make several calls to the quadruple func
    10·1 answer
  • What principle of animation helps facial features to be noticed?
    7·2 answers
  • _____ allows a function or operator to perform different tasks depending on the types of the arguments or operands. Group of ans
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!