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 is a disc brake system different from a drum brake system? Short answer
ddd [48]

Answer:

Disc brake system use a slim rotor and small caliper to halt wheel movement but a drum brake system allow heat to build up inside the drum during heavy braking .

6 0
3 years ago
Read 2 more answers
5. Which of the following is false about onStep?
katovenus [111]

The false statement about onStep is: B. The default number of steps per second is 30.

<h3>What is an onStep?</h3>

An onStep can be defined as a computerized telescope goto controller that is designed and developed to <u>animate shapes</u> while using it on a variety of mounting systems such as forks.

<h3>The characteristics of an onStep.</h3>

In Engineering, some of the characteristics that are associated with an onStep include the following:

  • The onStep function can be called without user input.
  • It can be used to animate shapes without user input.
  • It only runs a certain number of times.

In conclusion, the default number of steps per second for onStep isn't 30.

Read more on onStep here: brainly.com/question/25619349

7 0
2 years ago
Pumped-storage hydroelectricity is a type of hydroelectric energy storage used by electric power systems for load balancing. The
NikAS [45]

Answer:

A) energy loss E = pgQtH

Where p = density in kg/m3

g = gravity acceleration in m/s2

Q = flow rate in m3/s

t = time taken for flow in sec

H = height of flow in m

B) power required to run pump;

P = pgQH

Explanation:

Detailed explanation and calculation is shown in the image below

5 0
3 years ago
Given a matrix, clockwise-rotate elements in it. Please add code to problem3.cpp and the makefile. Use the code in p3 to test yo
rusak2 [61]

Answer:

/* C Program to rotate matrix by 90 degrees */

#include<stdio.h>

int main()

{

int matrix[100][100];

int m,n,i,j;

printf("Enter row and columns of matrix: ");

scanf("%d%d",&m,&n);

 

/* Enter m*n array elements */

printf("Enter matrix elements: \n");

for(i=0;i<m;i++)

{

 for(j=0;j<n;j++)

 {

  scanf("%d",&matrix[i][j]);

 }

}

 

/* matrix after the 90 degrees rotation */

printf("Matrix after 90 degrees roration \n");

for(i=0;i<n;i++)

{

 for(j=m-1;j>=0;j--)

 {

  printf("%d  ",matrix[j][i]);

 }

 printf("\n");

}

 

return 0;

 

}

5 0
3 years ago
The settlement of foundations is typically the result of three separate occurrences that take place in the soil which provides s
evablogger [386]

Answer:

The differences are listed below

Explanation:

The differences between consolidation and compaction are as follows:

In compaction the mechanical pressure is used to compress the soil. In consolidation, there is an application of stead pressure.

In compaction, there is a dynamic load by rapid mechanical methods like tamping, rolling, etc. In consolidation, there is static and sustained pressure applied for a long time.

In compaction, the soil volume is reduced by removing air from the void. In consolidation, the soil volume is reduced by squeezing out water from the pores.

Compaction is used for sandy soil, consolidation on the other hand, is used for clay soil.

7 0
3 years ago
Read 2 more answers
Other questions:
  • The steel water pipe has an inner diameter of 12 in. and a wall thickness of 0.25 in. If the valve A is closed and the water pre
    10·1 answer
  • Ammonia gas is diffusing at a constant rate through a layer of stagnant air 1 mm thick. Conditions are such that the gas contain
    14·1 answer
  • ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    9·1 answer
  • Pascal's law tells us that, pressure is transmitted undiminished throughout an open container. a)- True b) False
    9·1 answer
  • How do I calculate the gear ratio​
    6·1 answer
  • A 5000-lb truck is being used to lift a 1000-lb boulder B that is on a 200-lb pallet A. Knowing that the truck starts from rest
    8·1 answer
  • A coal fired power plant geneartes 2.4 lbs. of CO2 per kWh. A lighting system consumes 300,000kWh per year. A corporation is con
    15·1 answer
  • A 280 km long pipeline connects two pumping stations. It is desired to pump 0.56 m3/s of oil through a 0.62 m diameter line, the
    14·1 answer
  • What is a transition? A. An animation that happens on a single slide B. An outline format that uses roman numerals C. An image f
    10·1 answer
  • 2. A F-22 Raptor has just climbed through an altitude of 9,874 m at 1,567 kph when a disk
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!