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
Compared to 15 mph on a dry road, about how much longer will it take for
Marysya12 [62]

Answer:

8 to 10 times

Explanation:

For dry road

u= 15 mph        ( 1 mph = 0.44 m/s)

u= 6.7 m/s

Let take coefficient of friction( μ) of dry road is 0.7

So the de acceleration a = μ g

a= 0.7 x 10  m/s ²                         ( g=10 m/s ²)

a= 7 m/s ²

We know that

v= u - a t

Final speed ,v=0

0 = 6.7 - 7 x t

t= 0.95 s

For snow road

μ = 0.4

de acceleration a = μ g

a = 0.4 x 10 = 4 m/s ²

u= 30 mph= 13.41 m/s

v= u - a t

Final speed ,v=0

0 = 30 - 4 x t'

t'=7.5 s

t'=7.8 t

We can say that it will take 8 to 10 times more time as compare to dry road for stopping the vehicle.

8 to 10 times

7 0
3 years ago
Read 2 more answers
Write a Python program that does the following. Create a string that is a long series of words separated by spaces. The string i
dybincka [34]

Answer:

The code is attached.

Explanation:

I created a string s including 6 colors with spaces in between. Then I converted the string into a list x by using split() method. I used three different methods for removing elements from the list. These methods are remove(), pop() and del.

\\ Then I used methods append(), insert() and extend() for adding elements to the list.

\\ Finally I converted list into a string using join() and adding space in between the elements of the list.

4 0
3 years ago
An iron-carbon alloy initially containing 0.286 wt% C is exposed to an oxygen-rich and virtually carbon-free atmosphere at 1200°
Fantom [35]

Answer:

Explanation:

Given data:

initial construction co = 0.286 wt %

concentration at surface position cs = 0 wt %

carbon concentration cx = 0.215 wt%

time = 7 hr

D =  7.5 \times 10^{-11} m^2/s

for 0.225% carbon concentration following formula is used

\frac{cx -co}{cs -co} = 1 - erf(\frac{x}{2\sqrt{DT}})

where, erf stand for error function

\frac{cx -co}{cs -co} = \frac{0.215 -0.286}{0 -0.286} =0.248

0.248 = 1 - erf(\frac{x}{2\sqrt{DT}})

erf(\frac{x}{2\sqrt{DT}}) = 1 - 0.248

erf(\frac{x}{2\sqrt{DT}}) = 0.751

from the table erf(Z) value = 0.751 lie between (z) = 0.80 and z = 0.85 so by inteerpolation we have z = 0.815

from given table

\frac{x}{2\sqrt{DT}} = 0.815

x = 2\times 0.815 \times \sqrt{7.5 \times 10^{-11}\times (7\times 3600)

x = 2.39\times 10^{-3} m

x = 0.002395 mm

8 0
3 years ago
Which of the following has special properties that allow forces and pressure to be distributed evenly?
Thepotemich [5.8K]

Answer:

Fluids

Explanation:

Fluids has special properties that allow forces and pressure to be distributed evenly within them.

  • Fluids are gases and liquids whose intermolecular forces of attraction are generally weak or non-existence.
  • Therefore, when pressure is applied to them, it permeates evenly on all parts.
  • Their ability to tend to randomness makes liquids and gases very viable for distributing pressure.
7 0
3 years ago
A rectangular region ABCD is to be built inside a semicircle of radius 10 m with points A and B on the line for the diameter and
Talja [164]

Answer:A rectangular region ABCD is to be built inside a semicircle of radius 10 m with points A and B on the line for the diameter and points C and D on the semicircle with CD parallel to AB. The objective is to find the height h * that maximizes the area of ABCD.

Formulate the optimization problem.

Explanation:A rectangular region ABCD is to be built inside a semicircle of radius 10 m with points A and B on the line for the diameter and points C and D on the semicircle with CD parallel to AB. The objective is to find the height h * that maximizes the area of ABCD.

Formulate the optimization problem.

7 0
3 years ago
Other questions:
  • A large spherical tank contains gas at a pressure of 400 psi. The tank is constructed of high-strength steel having a yield stre
    15·1 answer
  • Output all combinations of character variables a, b, and c. If a = 'x', b = 'y', and c = 'z', then the output is: xyz xzy yxz yz
    14·1 answer
  • Can a real refrigerator have higher COP than the COP of the Carnot refrigerator?
    7·2 answers
  • If a toy car covers a distance of 42m in 7sec, what is it’s speed
    9·2 answers
  • How do you make a 3d print
    6·1 answer
  • Chad is working on a design that uses the pressure of steam to control a valve in order to increase water pressure in showers. W
    5·1 answer
  • What is the volume of the rectangular prism shown.
    9·1 answer
  • The build up of electrons will cause electrical called ?
    14·1 answer
  • A countinous shot that sense, flows well, and is understanable and pleasant to look at
    13·1 answer
  • Component of earthing and reasons why each material is being used<br><br>​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!