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
dimulka [17.4K]
4 years ago
12

For this homework you are writing a main function, with 3 subfunctions. 2. The "main" function is to be named arm_prop a. Inputs

: x => this is the vector that is sent to the function b. Outputs: gm, ra, hm => these are the outputs of the function gm => geometric mean, ra => RMS average, hm => ha
Engineering
1 answer:
ra1l [238]4 years ago
3 0

Answer:

MATLAB CODE:

clc;

clear all;

x=[1 2 3 4]; %Input vector of variable size

[gm,ra,hm]=arm_prop(x) %Main function calling , output values are hm, ra, hm and imput is x

%% Main function

function [gm,ra,hm]=arm_prop(x)

[gm]=geo_mean(x); %Calling Sub function 1

[ra]=rms_avg(x); %Calling Sub function 2

[hm]=har_mean(x); %Calling Sub function 3

 

%Sub function 2 =Rms average

function [gm]=geo_mean(x)    

n=numel(x); %calculating number of elemnts in vector x

temp=1; %Temporary value for multiplying each and every value of x

for i=1:1:n % For loop run for number of elements in x

temp=temp*x(i); %Multliplyng each and every element of x

end

gm=temp^(1/n); % Calculating geometric mean

end

%Sub function 2 =Rms average

function [ra]=rms_avg(x)

temp=0; %Temporary value for adding square of each and every value of x

N=numel(x); %calculating number of elemnts in vector x

for i=1:1:N % For loop run for number of elements in x

temp=temp+x(i)^2; %Adding square of each and every element of x

end

ra=(temp/N)^(1/2); % Calculating Rms average

end

%Sub function 3 =Harmonic mean

function [hm]=har_mean(x)

temp=0; %Temporary value for adding reciprocal of each and every value of x

N=numel(x); %calculating number of elemnts in vector x

for i=1:1:N % For loop run for number of elements in x

temp=temp+(1/x(i)); %Adding sreciprocal of each and every element of x

end

hm=N/temp; % Halculating Harmonic mean

end

end

Results:

gm =

2.2134

ra =

2.7386

hm =

1.9200

Here in one main function. 3 sub functions are written. Every sub function returns one output. As all 3 sub functions are inside main function, main function returns 3 output values gm, ra, hm.

Explanation:

You might be interested in
Which of the following team members would not be involved in the design of
dimulka [17.4K]

Answer:

Writer

Explanation:

5 0
3 years ago
PELASEE HELPPP WITH MARK BRAINLIST!!!! You are stopped at a red light, and a long string of cars is crossing in front of you. Wh
choli [55]

Answer:

1st one.

Explanation:

I think that because they the one who is going to get a ticket and also you will not gonna get in a car accident.

7 0
3 years ago
Read 2 more answers
Which of the following uses pressure and flow to transmit power from one location to another?
lord [1]

Answer:

fluid power

Explanation:

fluids commonly used in fluid power are Oil, Water, Air, CO², and Nitrogen gas, fluid power is commonly confused with hydraulic power, which only uses liquids, fluid power uses either liquids or gases

5 0
2 years ago
Select all that apply: Contaminated sharps should<br><br> not be<br><br> ----
PIT_PIT [208]

Answer:

Contaminated sharps should not be bent, recapped or removed.

Explanation:

Contaminated sharps are defined as "any contaminated object that can penetrate the skin including, but not limited to, needles, scalpels, broken glass, broken capillary tubes and exposed ends of dental wires".

4 0
3 years ago
(3) Calculate the heat flux through a sheet of brass 7.5 mm (0.30 in.) thick if the temperatures at the two faces are 150°Cand 5
bezimeni [28]

Answer:

a.) 1.453MW/m2,  b.)  2,477,933.33 BTU/hr  c.) 22,733.33 BTU/hr  d.) 1,238,966.67 BTU/hr

Explanation:

Heat flux is the rate at which thermal (heat) energy is transferred per unit surface area. It is measured in W/m2

Heat transfer(loss or gain) is unit of energy per unit time. It is measured in W or BTU/hr

1W = 3.41 BTU/hr

Given parameters:

thickness, t = 7.5mm = 7.5/1000 = 0.0075m

Temperatures 150 C = 150 + 273 = 423 K

                        50 C = 50 + 273 = 323 K

Temperature difference, T = 423 - 323 = 100 K

We are assuming steady heat flow;

a.) Heat flux, Q" = kT/t

K= thermal conductivity of the material

The thermal conductivity of brass, k = 109.0 W/m.K

Heat flux, Q" = \frac{109 * 100}{0.0075} = 1,453,333.33 W/m^{2} \\ Heat flux, Q" = 1.453MW/m^{2} \\

b.) Area of sheet, A = 0.5m2

Heat loss, Q = kAT/t

Heat loss, Q = \frac{109*0.5*100}{0.0075} = 726,666.667W

Heat loss, Q = 726,666.667 * 3.41 = 2,477,933.33 BTU/hr

c.) Material is now given as soda lime glass.

Thermal conductivity of soda lime glass, k is approximately 1W/m.K

Heat loss, Q=\frac{1*0.5*100}{0.0075} = 6,666.67W

Heat loss, Q = 6,666.67 * 3.41 = 22,733.33 BTU/hr

d.) Thickness, t is given as 15mm = 15/1000 = 0.015m

Heat loss, Q=\frac{109*0.5*100}{0.015} =363,333.33W

Heat loss, Q = 363,333.33 * 3.41 = 1,238,966.67 BTU/hr

5 0
3 years ago
Other questions:
  • A thin-walled tube with a diameter of 6 mm and length of 20 m is used to carry exhaust gas from a smoke stack to the laboratory
    7·1 answer
  • The net potential energy EN between two adjacent ions, is sometimes represented by the expression
    13·1 answer
  • What is the physical significance of the Reynolds number?. How is defined for external flow over a plate of length L.
    13·1 answer
  • An inverting amplifier with +11 V supply voltages normally has a sinusoidal output of 10 Vpp. When checking the circuit with an
    11·1 answer
  • A preheater involves the use of condensing steam at 100o C on the inside of a bank of tubes to heat air that enters at I atm and
    14·1 answer
  • Which of the following correctly explains why it would be beneficial for an engineer to become a member of the Leadership in Ene
    15·2 answers
  • Significant figures are an indicator of accuracy. a) True b) False
    8·1 answer
  • Pointssss 100 and brainliest :)
    5·1 answer
  • What Number Am I?
    13·1 answer
  • Which of the following is NOT a line used on blueprints?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!