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
Ganezh [65]
3 years ago
8

Write a function separatethem that will receive one input argument which is a structure containing fields named length and width

, and will return the two values separately. Here is an example of calling the function >> myrectangle = struct('length',33,'width',2); You just created a structure myrectangle with the above line of code. Now, if you send myrectangle into separatethem function, it should access the length and width fields and store it in output variables l and w (Again, no tips or tricks! do not overthink on this one. Just access the fields length and width from myrectangle input argument and store it in output variables l and w >> [l w] = separatethem(myrectangle) l = 33 w = 2
Engineering
1 answer:
SpyIntel [72]3 years ago
6 0

Answer:

%seperatethem.m

%Creation and definition of functions

function [l w] = separatethem(myrectangle)

%Call the structure field length.

l = myrectangle.length(1);

%Call the structure field length.

w = myrectangle.width(1);

%Ending call function.

end

%trial of program

%Create a structure with two fields length and width.

myrectangle = struct('length',33,'width',2);

%Call the function separate them.

[l w] = separatethem(myrectangle)

You might be interested in
Sketch T-s and p-v diagrams for the Diesel cycle.
labwork [276]

Answer:

Diesel cycle:

    All diesel engine works on diesel cycle.It have four processes .These four processes are as follows

1-2.Reversible adiabatic compression

2-3.Heat addition at constant pressure

3-4.Reversible adiabatic expansion

4-1.Heat addition at constant volume

When air inters in the piston cylinder after that it compresses and gets heated due to compression after that heat addition take place at constant pressure after that power is produces when piston moves to bottom dead center.

From the diagram of P-v And T-s we can understand so easily.

3 0
3 years ago
How do I get my son to do his work?
valentinak56 [21]

Answer:

Explanation:

Reward him if he does his homework/work

If he doesnt do his homework, take things that he loves off of him. and tell him if he does his homework/work he will get them things back

8 0
3 years ago
Explain The Basic Difference Between Bs2 And Bs3 Engine.​
snow_tiger [21]

Answer:

The main difference between the bs2 and bs3 engine is to present in the catalytic converter. And in bs2 engines the catalytic converter is does not used for the formation of hc and co. In bs3 engine there is no harmful emissions in the hc and co

3 0
2 years ago
2.1 What is the minimum number of pins required for a so-called dual-op-amp IC package, one containing two op amps? What is the
cupoosta [38]

Answer:

8 for dual-op-amp package, and 14 for quad-op-amp

Explanation;

This is because every op-amp has 2 input terminal 4 pns

So one output terminal that is 2 pins which are required for power

and the same for a minumum number of pins required by quad op amp which is 14

5 0
3 years ago
Water flows in a tube that has a diameter of D= 0.1 m. Determine the Reynolds number if the average velocity is 10 diameters per
Cloud [144]

Answer:

a) Re_{D} = 111896.745, b) Re_{D} = 1.119\times 10^{-7}

Explanation:

a) The Reynolds number for the water flowing in a circular tube is:

Re_{D} = \frac{\rho\cdot v\cdot D}{\mu}

Let assume that density and dynamic viscosity at 25 °C are 997\,\frac{kg}{m^{3}} 0.891\times 10^{-3}\,\frac{kg}{m\cdot s}, respectively. Then:

Re_{D}=\frac{(997\,\frac{kg}{m^{3}} )\cdot (1\,\frac{m}{s} )\cdot (0.1\,m)}{0.891\times 10^{-3}\,\frac{kg}{m\cdot s} }

Re_{D} = 111896.745

b) The result is:

Re_{D}=\frac{(997\,\frac{kg}{m^{3}} )\cdot (10^{-6}\,\frac{m}{s} )\cdot (10^{-7}\,m)}{0.891\times 10^{-3}\,\frac{kg}{m\cdot s} }

Re_{D} = 1.119\times 10^{-7}

6 0
3 years ago
Other questions:
  • The correct statement about the lift and drag on an object is:_______
    7·2 answers
  • Which of the following color schemes is composed of hues next to eachother on the color wheel ?
    7·1 answer
  • Set up the following characteristic equations in the form suited to Evanss root-locus method. Give L(s), a(s), and b(s) and the
    8·1 answer
  • What must you do if hauling a load of material which could fall or blow onto the roadway?
    14·1 answer
  • A shift register is a synchronous sequential circuit that will store or move data. It consists of several flip-flops, which are
    11·1 answer
  • A growing trend in urban design is the concept of a rooftop garden. If every building in a city were to install a rooftop garden
    13·1 answer
  • For all the problems describe all pieces to the equations. 1.What is the equation for normal stress? 2.What is the equation for
    7·1 answer
  • Cual es la definición de la distribución de las instalaciones?
    13·2 answers
  • The metal control joints used to relieve stresses caused by expansion and contraction in large ceiling or wall expenses in inter
    8·1 answer
  • Why do we need an architect?explain briefly by focusing on its various sectors.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!