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
schepotkina [342]
3 years ago
10

Write a MATLAB program in a script file that calculate the average, standard

Engineering
2 answers:
Kryger [21]3 years ago
7 0

Answer:

Code in MATLab is given as  below:

Explanation:

grade = input('Enter the grades as elements of a vector ');

x1 = length(grade);

fprintf('There are %5.2f grades\n',x1);

x2 = mean(grade);

fprintf('The average grade is %5.2f \n',x2);

x3=std(grade);

fprintf('The standard deviation is %5.2f \n',x3);

x4 = median(grade);

fprintf('The median grade is %5.2f \n',x4);

ella [17]3 years ago
4 0

Answer:

Complete Matlab code along with explanation and output results are given below.

Matlab Code:

clear all

close all

clc

input_grades = input('Enter the grades as elements of a vector ');  

len = length(input_grades);

fprintf('There are %.2f grades\n', len);

Mean = mean(input_grades);

fprintf('The Average grade is: %.3f\n', Mean);

STD=std(input_grades);

fprintf('The Standard Deviation is: %.3f\n', STD);

Median = median(input_grades);

fprintf('The Median grade is: %.2f\n', Median);

Output:

Enter the grades as elements of a vector [92,74,53,61,100,42,80,66,71,78,91,85,79,68]

There are 14.00 grades

The Average grade is: 74.286

The Standard Deviation is: 15.760

The Median grade is: 76.00

Explanation:

The user provides input vector of grades

Using the built-in functions of Matlab the length, mean, standard deviation and median of the grades are calculated and printed.

%.2f is a text formatting command that means show up to 2 decimal digits and convert the floating point values to text.

The input vector provided in the question is tested and the program is working correctly.

You might be interested in
Using an "AND" and an "OR", list all information (Equipment Number, Equipment Type, Seat Capacity, Fuel Capacity, and Miles per
Tomtit [17]

Answer:

Explanation :

The given  information to be listed can are Equipment Number, Equipment Type, Seat Capacity, Fuel Capacity, and Miles per Gallon.

Check the attached document for the solution.

5 0
3 years ago
A tank with some water in it begins to drain. The function v ( t ) = 46 − 3.5 t determines the volume of the water in the tank (
olchik [2.2K]

Answer with Explanation:

Part a)

The volume of water in the tank as a function of time is plotted in the below attached figure.

The vertical intercept of the graph is 46.

Part b)

The vertical intercept represents the volume of water that is initially present in the tank before draining begins.

Part c)

To find the time required to completely drain the tank we calculate the volume of the water in the tank to zero.

0=46-3.5t\\\\3.5=46\\\\\therefore t=\frac{46}{3.5}=13.143minutes

Part d)

The horizontal intercept represents the time it takes to empty the tank which as calculated above is 13.143 minutes.

7 0
3 years ago
Which of the following best describes the relationship between the World Wide Web and the Internet? А The World Wide Web is a pr
Gwar [14]

Answer:

C

Explanation:

5 0
2 years ago
Add a capacitor, C2 = 6 pF, in parallel with R3, and a capacitor, C3 = 2 pF in parallel with R4. Use PSpice to plot the magnitud
Ganezh [65]
Tell me why i got this question got it right and now won’t remember but i’ll get back at you when i remember
6 0
3 years ago
Please help!!
Inessa05 [86]

Answer:

I think that the answer is the Chinese

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a C program that will update a bank balance. A user cannot withdraw an amount ofmoney that is more than the current balanc
    13·1 answer
  • An experiment to determine the convection coefficient associated with airflow over the surface of a thick stainless steel castin
    6·1 answer
  • 0 - 1"<br> -20<br> -15<br> -10<br> 5<br> 0 1 2 3<br> 0
    14·1 answer
  • Balanced forces will result in which of the following
    9·1 answer
  • An engineer is trying to build a new measurement tool. Which step should the engineer complete first? A. Design a model of the t
    8·1 answer
  • What is the following diagram called?
    15·1 answer
  • A Wii remote flung from a hand through a TV, with a kinetic energy of 1.44J and a mass of 4.5kg. Whats the velocity?
    6·1 answer
  • Draw the six principal views of
    13·1 answer
  • My teacher wants me to build a perpetual motion machine and present it. I know they don't exist, and SHE knows they don't exist
    12·2 answers
  • On diesel engines, data from ________ sensors are commonly used to adjust exhaust gas recirculation (EGR) rates.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!