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
When subject to an unknown torque, the shear stress in a 2 mm thick rectangular tube of dimension 100 mm x 200 mm was found to b
laila [671]

Answer:

The shear stress will be 80 MPa

Explanation:

Here we have;

τ = (T·r)/J

For rectangular tube, we have;

Average shear stress given as follows;

Where;

\tau_{ave} = \frac{T}{2tA_{m}}

A_m = 100 mm × 200 mm = 20000 mm² = 0.02 m²

t = Thickness of the shaft in question = 2 mm = 0.002 m

T = Applied torque

Therefore, 50 MPa = T/(2×0.002×0.02)

T = 50 MPa × 0.00008 m³ = 4000 N·m

Where the dimension is 50 mm × 250 mm, which is 0.05 m × 0.25 m

Therefore, A_m = 0.05 m × 0.25 m = 0.0125 m².

Therefore, from the following average shear stress formula, we have;

\tau_{ave} = \frac{T}{2tA_{m}}

Plugging in then values, gives;

\tau_{ave} = \frac{4000}{2\times 0.002 \times 0.0125} = 80,000,000 Pa

The shear stress will be 80,000,000 Pa or 80 MPa.

7 0
3 years ago
Which of the following would not be considered hot work? A chipping B soldering C
tankabanditka [31]
I believe the answer is D: brazing
Hope this helps you have a good night
5 0
2 years ago
A cylindrical specimen of a hypothetical metal alloy is stressed in compression. If its original and final diameters are 16.403
Dmitry [639]

Answer:

A certain vehicle loses 3.5% of its value each year. If the vehicle has an initial value of $11,168, construct a model that represents the value of the vehicle after a certain number of years. Use your model to compute the value of the vehicle at the end of 6 years.

Explanation:

8 0
3 years ago
Dean is buying a home for $170,000. The mortgage company he decided to use to finance the home requires a 10% down payment. What
ANTONII [103]
They answer is 3. $17,00
8 0
3 years ago
Read 2 more answers
For a bronze alloy, the stress at which plastic deformation begins is 275 MPa, and the modulus of elasticity is 115 GPa. (a) Wha
Anton [14]

Answer:

89375 N

Explanation:

Rearrange the formula for normal stress for F:

\sigma=\frac{F}{A}

F=\sigma*A

Convert given values to base units:

275 MPa = 275*10^{6} Pa

325 mm^{2} = 0.000325 m^{2}

Substituting in given values:

F = (275*10^{6})*(0.000325)=89375 N

3 0
2 years ago
Other questions:
  • The manufacturer of a 1.5 V D flashlight battery says that the battery will deliver 9 {\rm mA} for 37 continuous hours. During t
    10·1 answer
  • Showing all of your work and algebra,generate an approximate expression for T as a function ofthe other variables. (b) Explain w
    12·1 answer
  • Once Joe Martin reports his concerns to senior management at corporate headquarters and requests that the Ethicana plant operati
    8·1 answer
  • A specimen of commercially pure copper has a strength of 240 MPa. Estimate its average grain diameter using the Hall-Petch equat
    14·1 answer
  • For a body moving with simple harmonic motion state the equations to represent: i) Velocity ii) Acceleration iii) Periodic Time
    11·1 answer
  • When -iron is subjected to an atmosphere of hydrogen gas, the concentration of hydrogen in the iron, CH (in weight percent), is
    5·1 answer
  • In a website browser address bar, what does “www” stand for?
    9·1 answer
  • I want to know if anyone else know how to tell apart real leather from fake leather?!?!
    6·2 answers
  • Select the correct answer. Which of the following devices is a simple machine? A.
    9·2 answers
  • A fully charged new battery will have a low conductance reading.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!