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
Copper (Cu) has FCC crystal structure. Atomic mass of Cu is 63.55 gmol-1 and radius of a copper atom is 0.128 nm, mean speed of
Ivenika [448]

Answer:

Explanation:

Copper (Cu) has FCC crystal structure. Atomic mass of Cu is 63.55 gmol-1 and radius of a copper atom is 0.128 nm, mean speed of conduction electrons in Cu is 1.5 × 10^6 m/s and frequency of vibration of the Cu atoms at 27 ° is 4 × 10^12 s-1. Nordheim’s Coefficient of Au in Cu is 5500 nΩ −m. a) Calculate the atomic density of copper b) Estimate the drift mobility of electrons in Cu c) Find the resistivity of pure Cu d) Find the resistivity of Cu if 1 at.% of Au is mixed in Cu. pls solve it

7 0
3 years ago
A transistor can not be used as a
valentinak56 [21]
Variable resistor is the best abs
4 0
4 years ago
Need help with this ez question pls help me will mark brainiest
bearhunter [10]
I am pretty sure the answer is false
6 0
3 years ago
Read 2 more answers
A right triangle has a height of 20 centimeters and a base of 10 centimeters. What is the área of the triangle
zmey [24]

Answer:

100 cm

Explanation:

...........................

6 0
3 years ago
A small lake with volume of 160,000 m^3 receives agricultural drainage waters that contain 150 mg / L total dissolved solids (TD
Stels [109]

Answer:

Explanation:

Given that : -

The desirable limit is 500 mg / l , but

allowable upto 2000 mg / l.

The take volume is V = 160.000 m3

V = 160 , 000 x 103 l

The crainage gives 150 mg / l and lake has initialy 100 mg / l

Code of tpr frpm drawn = 150 x 60, 000 x 1000

Ci = 9000 kg / gr

Cl = 100 x 160,000 x 1000

Cl = 16, 000 kg

Since allowable limit = 2000 mg / l

Cn = ( 2000 x 160, 00 x 1000 )

= 320, 000 kg

so, each year the rate increases, by 9000 kg / yr

Read level = ( 320, 000 - 16,000 )

Li = 304, 000 kg

Tr=<u>304,000</u>

      900

=33.77

5 0
3 years ago
Read 2 more answers
Other questions:
  • The development team recently moved a new application into production for the accounting department. After this occurred, the Ch
    6·1 answer
  • Find the velocity and acceleration of box B when point A moves vertically 1 m/s and it is 5 m
    6·1 answer
  • Select the correct statement(s) regarding frequency modulation (FM). a. baseband amplitude changes (information) are captured as
    6·1 answer
  • A HSS152.4 × 101.6 × 6.4 structural steel [E = 200 GPa] section (see Appendix B for crosssectional properties) is used as a colu
    9·1 answer
  • Fixed objects that fix a location are called
    11·1 answer
  • Consider a venture with a small hole drilled in the side of the throat. This hole is connected via a tube to a closed reservoir.
    8·1 answer
  • In a flow over a flat plate, the Stanton number is 0.005: What is the approximate friction factor for this flow a)- 0.01 b)- 0.0
    8·1 answer
  • In pea plants, tall height is dominant over short height. How can two tall plants result in a short offspring.
    7·1 answer
  • 2=333=3= im single text in comment
    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
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!