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
How does warming up the tires on a car increase grip with the pavement?
ICE Princess25 [194]

Answer:

because burning rubber increases the grip power

8 0
2 years ago
We can model a certain battery as a voltage source in series with a resistance. The open-circuit voltage of the battery is 10 V
Angelina_Jolie [31]

Answer:

51.4 Ohms

Explanation:

By applying voltage division rule

V_f=v_i\times \frac {R_l}{R_l+R_m} where v is voltage, subscripts i and f represnt initial and final, R is resistance, m is internal and l is external.Substituting 7V for final voltage, 10V for initial voltage and the external resistance as 120 Ohms then

7=10*\frac {120}{120+R_m}\\7R_m+840=1200\\R_m={1200-840}{7}=51.428571\approx 51.4 Ohms

3 0
3 years ago
What is the diffrence between a small block and a big block lets see if yall know
ivann1987 [24]

Answer:

The difference in weight and size?

Explanation:

It explains itself :P

5 0
2 years ago
I. Draw the velocity diagram for the instant shown and determine the velocity of
trapecia [35]

Answer:

?????????????????????????????????????

3 0
3 years ago
Need help right now pls
LenaWriter [7]
Put them in 2,4,1,3 and got in 100 in the test
7 0
3 years ago
Other questions:
  • For the SR-latch below high levels of Set and Reset result in Q= 1 and 0, respectively. The next state is unknown when both inpu
    12·1 answer
  • 3 examples of technology transfer pls
    12·2 answers
  • The design specifications of a 1.2-m long solid circular transmission shaft require that the angle of twist of the shaft not exc
    15·1 answer
  • 1. A copper block of volume 1 L is heat treated at 500ºC and now cooled in a 200-L oil bath initially at 20◦C. Assuming no heat
    10·1 answer
  • If a ball is dropped from a height its velocity will increase until it hits the ground, assuming that aerodynamic drag due to th
    6·1 answer
  • WARNING:<br><br> when people put links in the answer it is a virus DO NOT DOWNLOAD IT
    15·2 answers
  • A machine used to shred cardboard boxes for composting has a first cost of $10,000, an AOC of $7000 per year, a 3-year life, and
    14·1 answer
  • 6.48 programming project 1: encode/decode tic -tac-toe
    5·1 answer
  • 3.8 LAB - Select lesson schedule with multiple joins
    11·1 answer
  • Summarize key
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!