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
Karo-lina-s [1.5K]
3 years ago
6

Column arrays: Transpose a row array Construct a row array countValues with elements 1 to endValue, using the double colon opera

tor. Transpose countValues to result in a column array. Function Save Reset MATLAB DocumentationOpens in new tab function countValues = CreateArray(endValue) % endValue: Ending value of countValues % Construct a row array countValues with elements 1 to endValue, % using the double colon operator countValues = 1; % Transpose countValues to result in a column array end 1 2 3 4 5 6 7 8 9 10 11 Code to call your function

Engineering
1 answer:
White raven [17]3 years ago
7 0

Answer:

Matlab code with step by step explanation and output results are given below

Explanation:

We have to construct a Matlab function that creates a row vector "countValues" with elements 1 to endValue. That means it starts from 1 and ends at the value provided by the user (endValue).  

function countValues = CreateArray(endValue)

% Here we construct a row vector countValues from 1:endValue

     countValues = 1:endValue;

% then we transpose this row vector into column vector

     countValues = countValues';

 end

Output:

Calling this function with the endValue=11 returns following output

CreateArray(11)

ans =

    1

    2

    3

    4

    5

    6

    7

    8

    9

   10

   11

Hence the function works correctly. It creates a row vector then transposes it and makes it a column vector.

You might be interested in
The pressure gage on a 2.5-m^3 oxygen tank reads 500 kPa. Determine the amount of oxygen in the tank if the temperature is 28°C
s2008m [1.1K]

Answer:

19063.6051 g

Explanation:

Pressure = Atmospheric pressure + Gauge Pressure

Atmospheric pressure = 97 kPa

Gauge pressure = 500 kPa

Total pressure = 500 + 97 kPa = 597 kPa

Also, P (kPa) = 1/101.325  P(atm)

Pressure = 5.89193 atm

Volume = 2.5 m³ = 2500 L ( As m³ = 1000 L)

Temperature = 28 °C

The conversion of T( °C) to T(K) is shown below:

T(K) = T( °C) + 273.15  

So,  

T₁ = (28.2 + 273.15) K = 301.15 K  

Using ideal gas equation as:

PV=nRT

where,  

P is the pressure

V is the volume

n is the number of moles

T is the temperature  

R is Gas constant having value = 0.0821 L.atm/K.mol

Applying the equation as:

5.89193 atm × 2500 L = n × 0.0821 L.atm/K.mol × 301.15 K  

⇒n = 595.76 moles

Molar mass of oxygen gas = 31.9988 g/mol

Mass = Moles * Molar mass = 595.76 * 31.9988 g = 19063.6051 g

7 0
3 years ago
If the bending moment (M) is 4,176 ft-lb and the beam is an 1 beam, calculate the bending stress (psi) developed at a point with
SpyIntel [72]

Answer:

Bending stress at point 3.96 is \sigma_b = 1.37 psi

Explanation:

Given data:

Bending Moment M is 4.176 ft-lb = 50.12 in- lb

moment of inertia I = 144 inc^4

y = 3.96 in

\sigma_b = \frac{M}{I} \times y

putting all value to get bending stress

\sigma_b = \frac{50.112}{144} \times 3.96  

\sigma_b =  1.37 psi

Bending stress at point 3.96 is \sigma_b = 1.37 psi

3 0
4 years ago
An insulated piston-cylinder device contains 0.15 of saturated refrigerant-134a vapor at 0.8 MPa pressure. The refrigerant is no
Stells [14]

Answer:

Assumption:

1. The kinetic and potential energy changes are negligible

2. The cylinder is well insulated and thus heat transfer is negligible.

3. The thermal energy stored in the cylinder itself is negligible.

4. The process is stated to be reversible

Analysis:

a. This is reversible adiabatic(i.e isentropic) process and thus s_{1} =s_{2}

From the refrigerant table A11-A13

P_{1} =0.8MPa   \left \{ {{ {{v_{1}=v_{g}  @0.8MPa =0.025645 m^{3/}/kg } } \atop { {{u_{1}=u_{g}  @0.8MPa =246.82 kJ/kg } -   also  {{s_{1}=s_{g}  @0.8MPa =0.91853 kJ/kgK } } \right.

sat vapor

m=\frac{V}{v_{1} } =\frac{0.15}{0.025645} =5.8491 kg\\and \\\\P_{2} =0.2MPa  \left \{ {{x_{2} =\frac{s_{2} -s_{f} }{s_{fg }}=\frac{0.91853-0.15449}{0.78339}   = 0.9753 \atop {u_{2} =u_{f} +x_{2} }(u_{fg}) =  38.26+0.9753(186.25)= 38.26+181.65 =219.9kJ/kg \right. \\s_{1} = s_{2}

T_{2} =T_{sat @ 0.2MPa} = -10.09^{o}  C

b.) We take the content of the cylinder as the sysytem.

This is a closed system since no mass leaves or enters.

Hence, the energy balance for adiabatic closed system can be expressed as:

E_{in} - E_{out}  =ΔE

w_{b, out}  =ΔU

w_{b, out} =m([tex]u_{1} -u_{2)

w_{b, out}  = workdone during the isentropic process

=5.8491(246.82-219.9)

=5.8491(26.91)

=157.3993

=157.4kJ

4 0
3 years ago
A simple undamped spring-mass system is set into motion from rest by giving it an initial velocity of 100 mm/s. It oscillates wi
____ [38]

Answer:

f=1.59 Hz

Explanation:

Given that

Simple undamped system means ,system does not consists any damper.If system consists damper then it is damped spring mass system.

Velocity = 100 mm/s

Maximum amplitude = 10 mm

We know that for a simple undamped system spring mass system

V_{max}=\omega A

now by putting the values

V_{max}=\omega A

100 = ω x 10

ω = 10 rad/s

We also know that

ω=2π f

10 = 2 x π x f

f=1.59 Hz

So the natural frequency will be f=1.59 Hz.

6 0
4 years ago
Match the benefit of full synthetic oil with engine conditions: All engines
mart [117]

Answer:

1. All engines  exhibit wear over time ⇒ <em>Synthetic Improves engine protection by resisting oil breakdown.</em>

Synthetic oil does not breakdown so easily which means that it protects the engine more and protects it from wearing.

2. Engines are cold at start-up and not while running ⇒ <em> Synthetic provides maximum protection in extreme hot and cold temperature conditions.</em>

By providing protection for the engine during cold and hot conditions, the engine will not be too cold when the car is started up.

3.  If oil is thicker, engines lose power and efficiency ⇒ <em>Synthetic has greater resistance to oil thickening to maintain engine efficiency.</em>

Part of the characteristics of synthetic oil is that it does not get as thick as regular oil which means that the adverse effects of thick oil are spared on the engine.

7 0
3 years ago
Other questions:
  • Students would like to sell cold drinks to raise money for a field trip. They need to keep the drinks cold for 3 hours at the ba
    9·1 answer
  • A fire nozzle is coupled to the end of a hose with inside diameter D = 77 mm. The nozzle is smoothly contoured and its outlet di
    7·1 answer
  • For a ceramic compound, what are the two characteristics of the component ions that determine the crystal structure?
    13·1 answer
  • Which type of fires should you fight with a portable fire<br> extinguisher?
    8·1 answer
  • In this image if the ground were removed from the neutral wire what would the voltage to ground be?
    6·1 answer
  • Determine the size of memory needed for CD recording of a piece of music, which lasts for 26 minutes, is done with a 20-bit Anal
    14·1 answer
  • Which of the following conditions would completely shut down a circuit
    10·1 answer
  • What color is an orange? its for my 8th grade
    13·1 answer
  • A European apparel manufacturer has production facilities in Italy and China to serve its European market, where annual demand i
    6·1 answer
  • B/ Evaluate e^(πi/2)
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!