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
QveST [7]
3 years ago
13

Using a function file, create a function that will compute the area and perimeter of a square given the length of the side. The

input variable will be the length and the output will be the area and the perimeter. Use an input command in the script file to ask the user to enter the length in inches, then use the function to compute the values and in the script file print the values to the screen. Repeat this until the user decides to quit For testing purposes please use the following inputs for the file you submit: Testing Conditions Length 5 in Length 10 in Length 7.5 in
Engineering
1 answer:
mylen [45]3 years ago
6 0

Answer:

Using Matlab, the code is here

function p = Sq(side)

a = side*side;

p = 4*side;

fprintf("The area of square is %.2f\n",a);

fprintf("The perimeter of square is %.2f\n",p);

end

while true

side = input("Enter the side of square: ");

Sq(side);

c = input("Do you wish to continue (Y/N) ?", 's');

if c=='n' || c=='N'

break;

end

You might be interested in
A hollow steel tube with an inside diameter of 100 mm must carry a tensile load of 400 kN. Determine the outside diameter of the
Olegator [25]

Answer:

119.35 mm

Explanation:

Given:

Inside diameter, d = 100 mm

Tensile load, P = 400 kN

Stress = 120 MPa

let the outside diameter be 'D'

Now,

Stress is given as:

stress = Load × Area

also,

Area of hollow pipe = \frac{\pi}{4}(D^2-d^2)

or

Area of hollow pipe = \frac{\pi}{4}(D^2-100^2)

thus,

400 × 10³ N = 120 × \frac{\pi}{4}(D^2-100^2)

or

D² = tex]\frac{400\times10^3+30\pi\times10^4}{30\pi}[/tex]

or

D = 119.35 mm

7 0
3 years ago
Read 2 more answers
For some transformation having kinetics that obey the Avrami equation , the parameter n is known to have a value of 1.1. If, aft
ivanzaharov [21]

Answer:

total time  = 304.21 s

Explanation:

given data

y = 50% = 0.5

n = 1.1

t = 114 s

y = 1 - exp(-kt^n)

solution

first we get here k value by given equation

y = 1 - e^{(-kt^n)}   ...........1    

put here value and we get

0.5 = 1 - e^{(-k(114)^{1.1})}    

solve it we get

k = 0.003786  = 37.86 × 10^{4}

so here

y = 1 - e^{(-kt^n)}

1 - y  =  e^{(-kt^n)}

take ln both side

ln(1-y) = -k × t^n  

so

t = \sqrt[n]{-\frac{ln(1-y)}{k}}    .............2

now we will put the value of y = 87% in equation  with k and find out t

t = \sqrt[1.1]{-\frac{ln(1-0.87)}{37.86*10^{-4}}}

total time  = 304.21 s

7 0
3 years ago
What is the lehr and what purpose does it serve?
levacccp [35]

Explanation:

Step1

Lehr is the long open or closed insulated space for glass manufacturing. Lehr must be large enough to keep the cooling of glass uniform. The function of Lehr is the same as an annealing process in metallurgy.  

Step2

Lehr decrease the cooling and temperature variation in glass production. Uneven temperature creates the internal stress in the glass. Lehr reduces the internal stress in the glass product.  So, the main purpose of the Lehr is to reduce the internal stress and keep the cooling uniform.

5 0
3 years ago
Wind blows on the side of a fully enclosed hospital located on open flat terrain where V= 120 mi/h. Determine the external press
ss7ja [257]

Answer:

The external pressure is p = -21.9 psf or p = -8.85 psf

Explanation:

Given :

Velocity of wind, v = 120 mi / hr

$k_d = k_c =1 $   (wind direction factor)

$k _{zt} = 1 $  = topographical factor (for flat terrain)

$ q_n$ = velocity pressure at height h

$ \therefore q_n = 0.00256 k_z k_{zt} k_d v^2 $

$  q_n = 0.00256 \times  k_z (1)(1)(120)^2 $

    $ = 36.86 k_z$

But for height h = 30 ft, $ k_z$ = 0.98 (from table)

$ \therefore q_n = 36.86 \times 0.98 $

        = 36.16

Now, $ \frac{L}{B}= \frac{200}{200} =1$ ,   so $C_p=-0.5 $ (from table)

$p = q(G)(C_p)-q_n(GC_{pi})$

where, p = external pressure

            G = 0.85 = gust factor (for typical rigid building)

            $GC_{pi} = \pm 0.18 $   (internal pressure co efficient)

Therefore putting the values,

$p = (36.13)(0.85)(-0.5)-(36.13)(\pm 0.18)$

p = -21.9 psf or p = -8.85 psf

4 0
4 years ago
Poached eggs are cooked in bath of boiling water at 100°C. Over time they reach thermal equilibrium with the bath. They are then
barxatty [35]

Answer:

Check the explanation

Explanation:

Kindly check the attached images below to see the step by step explanation to the question above and also note that I derived the whole expressions in variable firm that are required to solve this question and giving reasons for each step so that you can employ these steps in solving new problems.

8 0
3 years ago
Other questions:
  • Both 1042 steel and 4340 steel are used commercially to make quenched round bars of about the same diameter, such as 1 in. Often
    11·1 answer
  • Tech A says that low compression on a single cylinder will cause an engine not to start. Tech B says that low compression on a s
    7·1 answer
  • The given family of functions is the general solution of the differential equation on the indicated interval.Find a member of th
    11·1 answer
  • Realiza las siguientes conversiones.
    12·1 answer
  • An air standard cycle with constant specific heats is executed in a closed pistoncylinder system and is composed of the followin
    10·1 answer
  • The exterior brick surface of a house has a surface area of 203203 m2 in the winter when the temperature is 0.000.00 °C. How muc
    9·1 answer
  • What are the 392 steps for writing an essay?
    11·1 answer
  • We intend to measure the open-loop gain (A open ) of an actual operational amplifier. The magnitude of A_open is in the range of
    15·1 answer
  • Giving away points hope they help with your questions
    14·1 answer
  • An engineer is tasked to design a combinational circuit with three inputs x, y, z and one output F to satisfy the following cond
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!