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
Leya [2.2K]
2 years ago
12

Create a vector of structures experiments that stores information on subjects used in an experiment. Each struct has four fields

: ID, name, weights, and height. The field ID is an integer, name is a string, weights are a vector with two values in pounds (both of which are double values), and height is a struct with fields feet and inches (both of which are integers). The following is an example of what the format might look like.
Experiments
ID Name Weights Height (feet) Icnhes
1 2
1 1111 Bob 150.1 149.6 6 1
2 2222 Ann 106.2 106.6 5 3

Write a function printhheight that will receive a vector of structures in this format and will print the name, ID and height of each subject in inches (1 foot = 12 inches). This function calls another function height that receives a height struct and returns the total height in inches. This function could also be called separately.
Computers and Technology
1 answer:
ella [17]2 years ago
7 0

Answer:

im assuming this is required to be done in matlabs.

Explanation:

experiment.m

% Create an "experiments" vector of structures

% variable, and pass it to a function that will

% print the height of each subject

experiments(2) = struct('ID', 2222); 'name'; 'Ann'; ...  

   'weights'; '106.2, 106.6.9'; 'height'; struct('feet',5, 'inches',3);

experiments(1) = struct('ID',1111);'name'; 'Bob'; ...  

'weights'; '150.1, 149.6'; 'height'; ...

struct('feet', 6, 'inches', 1);

printhheight(experiments)

printhheight.m

function printhheight(experiments)

% Prints height of every subject

% Format of call: prinths(experiments vector)

% Does not return any values

for i = 1 : length(experiments), high = height(experiments(i)*height);

fprintf('%s is %d inches tall\n', ...

     experiments(i).name, high)

end

end

height.m

function ht = height(expstruct)

% Calculates height in inches of a subject

% Format of call: height(experiment struct)

% Returns height in inches

ht = expstruct.feet*12+expstruct.inches;

end

You might be interested in
The points a b c and d lie on a straight line ab:bd = 1:4
pochemuha

The points a b c and d lie on a straight line ab:bd = 1:4 are A line that extends to infinity on both sides and has no curves is called a straight line.AB:BC=3:4.

<h3>What do you call a straight line?  </h3>

A line is simply an object in geometry denoted as an object with no width that extends on both sides. A straight line is just a line with no curves.

  • AC=AB+BC=3+4=7;  AC:CD=2:1, i.e. AC=2;   because we get 2 different lengths for AC, we change the given ratio AC:CD to an equivalent one with AC=7 .
  • As follows: AC:CD = 2 : 1 = 7 : 3.5 (multiply both sides by 3.5 )   Now we have AC:CD = 7 : 3.5 and AD = AC+CD= 7+3.5 = 10.5,, and the answer is: the ratio  BC:AD = 4:10.5.

Read more about the straight line:

brainly.com/question/3493733

#SPJ1

3 0
2 years ago
Develop the truth table for each of the combinational logic circuits
Fudgin [204]

Answer:

ang haba po grabe hahahhaahhahahahahah

Explanation:

pabrainlest po t.y

3 0
2 years ago
In terms of system thinking, what is process?
Talja [164]

Answer:b) The computer program that processes the data.

Explanation: In the computer system , process is the part of computer program which are responsible for performing of the processing of the data and other functions .The working of the process is associated with the program code and related activities/functions.

Other options that are mentioned in the question are incorrect because they don't describe the process correctly .Thus , the correct answer is option (b).

5 0
2 years ago
Read 2 more answers
The problem identification document commits the final and complete problem specification to paper and guides the software develo
tatuchka [14]

Answer:

False.

Explanation:

The problem identification document contains the description  of the problems that are restricting the goals and objectives of the project from being achieved.

It does not guide in decision making of the software developers.It helps them to see where the problem is not in decision making.

Hence the answer to this question is False.

7 0
2 years ago
_____ is confirming the significance of what another person is feeling.
il63 [147K]

Validation: Understanding and showing acceptance for another person                

4 0
3 years ago
Read 2 more answers
Other questions:
  • What is the difference between www vs internet in information technology?
    13·1 answer
  • Create a button to play the playlist <br><br> Java, netbeans
    7·2 answers
  • Microprocessors can’t directly understand programming languages, so programs have to be converted into _____________ that corres
    15·1 answer
  • Late at night, some traffic signals change patterns and become _____.
    9·2 answers
  • Which of the following information would best be displayed throughout the use of a time line
    11·1 answer
  • Create a class named Console, and move all the methods that retrieve and validate user input to that class. These methods can re
    7·1 answer
  • You buy a new workstation that features an embedded RAID controller on the motherboard. You want to setup hardware RAID 10. How
    10·2 answers
  • Which of the following might an interior designer in the retail industry specialize in?
    9·1 answer
  • A large computer software firm promised a client that it could deliver a new operating system on a tight deadline and put Keith
    10·2 answers
  • Imagine that you need to prepare for three end-of-term tests. What steps will you take to make sure your study time is well spen
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!