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
A continuous random variable, X, whose probability density function is given by f(x) = ( λe−λx , if x ≥ 0 0, otherwise is said t
Ganezh [65]

Answer:

a) F(x) = \lambda \int_0^{\infty} e^{-\lambda x} dx= -e^{-\lambda x} \Big|_0^{\infty} = 1- e^{-\lambda x} \

b) P(10 < X

Explanation:

Previous concepts

The cumulative distribution function (CDF) F(x),"describes the probability that a random variableX with a given probability distribution will be found at a value less than or equal to x".

The exponential distribution is "the probability distribution of the time between events in a Poisson process (a process in which events occur continuously and independently at a constant average rate). It is a particular case of the gamma distribution".

Part a

Let X the random variable of interest. We know on this case that X\sim Exp(\lambda)

And we know the probability denisty function for x given by:

f(x) = \lambda e^{-\lambda x} , x\geq 0

In order to find the cdf we need to do the following integral:

F(x) = \lambda \int_0^{\infty} e^{-\lambda x} dx= -e^{-\lambda x} \Big|_0^{\infty} = 1- e^{-\lambda x} \

Part b

Assuming that X \sim Exp(\lambda =0.1), then the density function is given by:

f(x) = 0.1 e^{-0.1 x} dx , x\geq 0

And for this case we want this probability:

P(10 < X

And evaluating the integral we got:

P(10 < X

4 0
3 years ago
Typical noise associated with failed cv joint​
igor_vitrenko [27]

Answer:

A worn inner CV joint often makes a clunking noise during starts and stops.

3 0
3 years ago
What are the two main what are the two main concerns in the research of fluid power efficiency?
Galina-37 [17]

Answer:

The correct option is;

Materials and Components

Explanation:

The efficiency of fluid power is influenced by the components and the materials used to deliver the power of the fluid as such fluid power control are focused on

1) Advances in fluid power

2) Making use of the advantages

3) Making use of the other externally available technological advantages

4) Giving allowance for disadvantages

Areas of interest in advances in fluid power are;

a. Computer optimized flow

b. The use of new and improved materials/coatings

c. The use of components that save energy, such as intelligent supply pressure adapting systems

3 0
2 years ago
Read 2 more answers
What are the inputs, outputs and side effects of a PSP?
Kipish [7]

Answer:

Side effects - sudden loss of balance/ repeated falls

Outputs - sever sickness and could me factual

Inputs/corrections of this- medications and experimental treatments to help slow the process of deterioration

5 0
3 years ago
What are the different types of documents used to communicate engineering designs?
Ipatiy [6.2K]

Answer:

COMMON ENGINEERING DOCUMENTS

Inspection or trip reports.

Research, laboratory, and field reports.

Specifications.

Proposals.

Progress reports.

ect...

Explanation:

7 0
3 years ago
Other questions:
  • If there are 16 signal combinations (states) and a baud rate (number of signals/second) of 8000/second, how many bps could I sen
    7·1 answer
  • A compression ignition engine when tested gave an indicator card having area 3250mm^2 and length 73mm. The calibration factor wa
    10·1 answer
  • Why do we write proton ions first before electron ions? <br>​
    10·1 answer
  • Please help me in this assignment.
    13·1 answer
  • The 10mm diameter rod is made of Kevlar 49. Determine the change in
    7·1 answer
  • Calculate the wire pressure for a round copper bar with an original cross-sectional area of 12.56 mm2 to a 30% reduction of area
    11·1 answer
  • all of the following are steps in the problem solving process except a. try, b. reflect, c. debug, d. define
    11·1 answer
  • Safety-in engineering as with everything else is all about trying to maximize or create the hazards involved with what you are d
    6·2 answers
  • Need help, I will give cake :))<br><br> + branliest
    14·2 answers
  • Technician A says reducing spark advance can cause spark knock. Technician B says excessive carbon deposits can cause spark knoc
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!