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
What happens when force is placed on a square/rectangle?
mart [117]

im not sure i need to see a photo and also is this science

7 0
3 years ago
Read 2 more answers
If gas costs $3.50 per gallon, how much would it cost to drive 500 miles in a city in a car that is 58.3 km/L
Akimi4 [234]
1 liter = .264 gallon
1 km = .621 mile

this means that 58.3km/L is equal to 137.13mpg

so

500/137.13 = 3.65 gallons of gas

3.65 x 3.5 = $12.78
5 0
3 years ago
On a date when the earth was 147.4x106 km from the sun, a spacecraft parked in a 200 km altitude circular earth orbit was launch
rewona [7]

Answer:

ΔV =  =v_{p} -v_{c} = 3.337 \frac{km}{s}

Explanation:

Distance of earth from sun = R_{2} = 147.4 \times 106 Km

Spacecraft perihelion = R_{2} = 120\times106Km

gravitational parameters are now given as

\mu_{sun} = 132.7\times 10^{9}

\mu_{earth} = 398600

radius of earth  = 6378 Km

Heliocentric spacecraft velocity at earth sphere of influence =

   V_{D}^{v} =\sqrt{2\mu_{sun}} \sqrt{\frac{R_{2} }{R_{1}(R_{1} +R_{2} ) } }

V_{D}^{v} =28.43\frac{km}{s}

Heliocentric velocity of earth = v_{earth} = 30.06\frac{km}{sec}

V_{infinity}= v_{earth}-V_{D}^{v} =30.06-28.43=1.57g\frac{km}{s}

assume

r_{p} =r_{earth} +r_{altitude} =6378 + 200 = 6578Km

Geometric spacecraft velocity of spacecraft at perigee of departure hyperbola

v_{p}=\sqrt{v^{2} _{infinity}+\frac{2\mu_{earth} }{r_{p} } } = 11.12\frac{km}{s}

geometric space craft velocity in its circular parking orbit

v_{c}=\sqrt{\frac{\mu_{earth} }{r_{p} } }  = 7.784 \frac{km}{s}

              ΔV =  =v_{p} -v_{c} = 3.337 \frac{km}{s}

7 0
4 years ago
Which stroke of the four stroke cycle is shown in the above figure.
SpyIntel [72]
You need to attach the image
3 0
3 years ago
Read 2 more answers
The following two questions refer to the circuit below. Consider a non-ideal op amp where the output can saturate. The open loop
kotykmax [81]

Answer:

The most positive is value of Vs is 0.5mV

6 0
3 years ago
Other questions:
  • 2.7. The term route of entry on an SDS refers to the way a
    13·1 answer
  • What are four types of biomass that can be converted into alternative fuels
    9·1 answer
  • You are tasked to specify the flash storage device in General Electric's Data Logger Unit used in the smart power grid. The DLU
    12·1 answer
  • Exercise 1. (Sum of Integers) Implement the functions sum_iter() and sum_rec() in sum_of_ints.py that take an integer n as argum
    9·1 answer
  • It is proposed to deposit a 5 μm thick nickel coating uniformly on all surfaces of a ceramic strip measuring 15 cm x 5 cm x 2 cm
    7·1 answer
  • The critical resolved shear stress for a metal is 39 MPa. Determine the maximum possible yield strength (in MPa) for a single cr
    6·1 answer
  • From the following numbered list of characteristics, decide which pertain to (a) precipitation hardening, and which are displaye
    5·1 answer
  • An engineer lives in Hawaii at a location where the annual rain fall is 300 inches. She decides to use the rain to generate elec
    10·1 answer
  • The demand for Manufacturing jobs is O decreasing O increasing O slowly changing. O remaining constant.​
    6·2 answers
  • Aqueous cleaners are ________ parts cleaning agents.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!