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
Schach [20]
3 years ago
15

Create a separate function file fieldtovar.m that receives a single structure as an input and assigns each of the field values t

o user-defined variables. The function should work for a structure with any number of fields. Additionally, implement an error check to ensure that the number of userdefined variables (output arguments) is equal to the number of structure fields.
Engineering
1 answer:
Soloha48 [4]3 years ago
4 0

Answer:

Explanation gives the answer

Explanation:

% Using MATLAB,

% Matlab file : fieldtovar.m

function varargout = fieldtovar(S)

% function that accepts single structure as input, assigning each

% of the field values to user-defined variables

fields = fieldnames(S); % get the field names of the input structure

% check if number of user-defined variables and number of fields in

% structure are equal

if nargout == length(fields)

% if equal assign each value of structure to user-defined varable

for i=1:nargout

varargout{i} = getfield(S,fields{i});

end

else

% if not equal display an error message

error('The number of output variables does not equal the number of fields');

end

end

%This brings an end to the program

You might be interested in
Match the military operation to the category of satellite that would perform it.
SOVA2 [1]

Answer:

1. Location of enemy ground troops  - EARTH OBSERVING.

Using earth observing satellite imagery, the military can observe vast expanses of land and in so doing, find the location of enemy ground troops.

2. Routine reconnaissance of an unfamiliar climate  - WEATHER

In other to find out more about the climate of an area, a weather satellite can be used to observe the areas and its changing weather patterns.

3. Analyze waterways in an unfamiliar location  - NAVIGATION

Using navigation satellites, navigation conduits such as roads and waterways can be observed.

4. Provide warning of an attack - COMMUNICATION.

Communications satellites enable people to communicate over great distances and so can be used by the military to warn of an impending attack.

5 0
2 years ago
A compound sliding miter saw can be used to make
Sunny_sXe [5.5K]

Answer:

D

Explanation:

3 0
2 years ago
8. Two 40 ft long wires made of differing materials are supported from the ceiling of a testing laboratory. Wire (1) is made of
san4es73 [151]

Answer:

Material K has a modulus of elasticity E=3.389× 10¹¹ Pa

Material H has a modulus of elasticity E=1.009 × 10⁹ Pa

Material K has higher value of modulus of elasticity than material H

Material K is stiffer.

Explanation:

Wire 1 material H

Length=L = 40 ft =12.192 m

Diameter= 3/8 in = 0.009525 m

Area= A= πr²,where r=0.009525/2 =0.004763

A=3.142*0.004763² =0.00007126 m²

Force, F= 225 lb=  225*4.45 =1001.25 N

Change in length =Δ L= 0.10 in = 0.00254

To find modulus of elasticity apply'

E=F*L/A*ΔL

E=1001.25*12.192/(0.004763*0.00254)

E= 1009027923.58 Pa

E=1.009 × 10⁹ Pa

For Wire 2 material K

Length=L= 40 ft =12.192 m

Diameter = 3/16 in = 0.1875 in = 0.004763 m

Area= πr² = 3.142 * (0.004763/2)² = 0.00000567154 m²

Force, F= 225 lb=  225*4.45 =1001.25 N

Change in length =Δ L= 0.25 in =0.00635 m

To find modulus of elasticity apply'

E=F*L/A*ΔL

E= (1001.25*12.192)/(0.00000567154 * 0.00635 )

E=338955422575 Pa

E=3.389× 10¹¹ Pa

Material  K has a greater modulus of elasticity

The material with higher value of E is stiffer than that with low value of E.The stiffer material is K.

8 0
3 years ago
QUESTION ONE Write short answers on the following questions: i. Rainfall depth over a watershed is monitored through six number
Bond [772]

Answer:

identify function of the system unit and its components

4 0
2 years ago
Discuss the differences between conduction and convective heat transfer.
FrozenT [24]

Answer:

Basically there are two principal differences between the convection and conduction heat transfer

Explanation:

The conduction heat transfer is referred to the transfer between two solids due a temperature difference, while for, the convective heat transfer is referred to the transfer between a fluid (liquid or gas) and a solid. Also, they used different coefficients for its calculation.

We can include on the explanation that conduction thermal transfer is due to temperature difference, while convection thermal transfer is due to density difference.

8 0
2 years ago
Other questions:
  • Air is compressed adiabatically from p1 1 bar, T1 300 K to p2 15 bar, v2 0.1227 m3 /kg. The air is then cooled at constant volum
    13·1 answer
  • What Degree Do You Need To Become a Solar Engineer?<br> (2 or more sentences please)
    13·1 answer
  • For a fluid with a Prandtl Number of 1000.0, the hydrodynamic layer is thinner than the thermal boundary layers. a) True b) Fals
    5·1 answer
  • What is the function of a regulator?
    8·1 answer
  • The shaft is hollow from A to B and solid from B to C. The shaft has an outer diameter of 79 mm, and the thickness of the wall o
    6·1 answer
  • What word is typically written at the bottom of a cover letter to indicate an
    12·2 answers
  • If aligned and continuous carbon fibers with a diameter of 9.90 micron are embedded within an epoxy, such that the bond strength
    11·1 answer
  • A___ remote control can be an advantage to an
    14·2 answers
  • What is considered the greatest engineering achievement of the 20th century?
    10·1 answer
  • In an RL parallel circuit, VT = 240 V, R = 330 Ω, and XL = 420 Ω. What is the Apparent Power (VA)?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!