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
Write a class called MagicSquare, which contains a single method called check that accepts a two-dimensional array as an argumen
ira [324]

Answer:

public class MagicSquare {

   public static void main(String[] args) {

       int[][] square = {

               { 8, 11, 14, 1},

               {13, 2, 7,12},

               { 3, 16, 9, 6},

               {10, 5, 4, 15}

       };

       System.out.printf("The square %s a magic square. %n",

               (isMagicSquare(square) ? "is" : "is not"));

   }

   public static boolean isMagicSquare(int[][] square) {

       if(square.length != square[0].length) {

           return false;

       }

       int sum = 0;

       for(int i = 0; i < square[0].length; ++i) {

           sum += square[0][i];

       }

       int d1 = 0, d2 = 0;

       for(int i = 0; i < square.length; ++i) {

           int row_sum = 0;

           int col_sum = 0;

           for(int j = 0; j < square[0].length; ++j) {

               if(i == j) {

                   d1 += square[i][j];

               }

               if(j == square.length-i-1) {

                   d2 += square[i][j];

               }

               row_sum += square[i][j];

               col_sum += square[j][i];

           }

           if(row_sum != sum || col_sum != sum) {

               return false;

           }

       }

       return d1 == sum && d2 == sum;

   }

}

5 0
3 years ago
Which of the following may present a problem for Linux users?
motikmotik
Tendancy to crash hope that helped
6 0
4 years ago
Read 2 more answers
Which of the following indicates the main benefit of having a larger hard drive on a computer
dem82 [27]
I would say the primary Beni fit is more space for storage , but also it does effect the speed eventually. If your hard drive is almost full, everything will be slower
8 0
4 years ago
The price elasticity of demand for mobile phones a. will be higher if there is an improvement in the production technology. b. w
rodikova [14]

Answer:

b. will be lower if consumers perceive mobile phones to be a necessity.

Explanation:

The price elasticity of demand is described as the percentage variation in the demanded quantity of service or goods divided by the change in the percentage of the price. And henceforth it describes the responsiveness of the demanded quantity to a price change. And now if the mobile phones are thought of as being the necessity then the price will increase as demand will increase, and hence the price elasticity of demand will be lower. And if there is an improvement in the production technology then the price will be lowered, and hence price elasticity of demand will be less as the change in the percentage of the price will be negative. And the exact definition of it as we have described above. Hence, b is correct options.

3 0
3 years ago
How to tell what wifi your nest camera is connected to
daser333 [38]

Answer:

On the app home screen, tap Settings .

Select Home info then Home Wi-Fi help. ​Note: If you don't find Home Wi-Fi help, you'll need to remove your camera from the app and add it back with new Wi-Fi information.

Select the camera you want to update.

Tap Start. Update settings.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following were input devices for early portable computers?
    6·1 answer
  • You are hired to film a small, independent movie. You have a budget of $200,000 and 10 weeks in which to complete the first roun
    9·1 answer
  • What effect can camera tilt create? Do you think this is effective? Why or why not?
    14·2 answers
  • Summarize the distinction between a flat file and a database
    15·1 answer
  • Which logging category does not appear in event viewer by default?
    11·1 answer
  • Project management software helps you develop a ______________, which serves as a basis for creating Gantt charts, assigning res
    15·1 answer
  • There is a class called Roster whose constructor takes a List of tuples with the names of students and their grades in the class
    13·1 answer
  • Draw a flowchart that ask the user to enter number: if the number is less than then 10 number it is doubled if the number is mor
    7·1 answer
  • The engine that runs the computer. Small computers have one, while larger computers may
    15·1 answer
  • Algorithm to calculate the sum and difference of 15 and 12​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!