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
Think about how could you design, build, and test a light maze. What specific behavior of light will be essential to the success
Mrac [35]

Answer:

Reflection

Explanation:

The specific behavior of light that will be essential to ensure the success of your design is "Reflection". This is because light maze makes use of a mirror and it's the light that is reflected that we see with our eyes. Also, the manner in which light is reflected off objects will affect the colors that are reflected as well.

4 0
3 years ago
An inductor and resistor are connected in parallel to a 120-V, 60-Hz line. The resistor has a resistance of 50 ohms, and the ind
BARSIC [14]

Answer:

hi

Explanation:

the answer would be I dont know

6 0
3 years ago
Do not answer pls thank you
astra-53 [7]

The answer is answered! Explanation:

4 0
3 years ago
Read 2 more answers
NO LINK plsssss just answer
solmaris [256]

Answer:

Explanation:

4 0
2 years ago
Which of the following shot pellets has the smallest diameter?
vitfil [10]
I believe i got this correct when i had an assignment with this question. It should be 7 1/2. B!
5 0
3 years ago
Other questions:
  • In engineering, economic cost is a decision-making tangible factor. Group of answer choices True False
    12·2 answers
  • Match the description with the term. I need help
    7·1 answer
  • Block A has a weight of 8 lb. and block B has a weight of 6 lb. They rest on a surface for which the coefficient of kinetic fric
    8·1 answer
  • The basic barometer can be used to measure the height of a building. If the barometric readings at the top and the bottom of a b
    15·1 answer
  • A coin placed 30.8 cm from the center of a rotating, horizontal turntable slips when its speed is 50.8 cm/s.
    12·1 answer
  • In highways the far left lane is usually the _____
    11·2 answers
  • Do YOU have big brain?
    15·2 answers
  • In a website browser address bar, what does “www” stand for?
    9·1 answer
  • Gtjffs
    5·1 answer
  • que sabemos de la revolución industrial y como ese proceso impulso el uso de los controles eléctricos en las industrias
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!