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
Linda is the education manager for a national coding service company. Once a month she holds a videoconference with all her codi
Andru [333]

Answer:

Option (D) i.e., synchronous is the correct option to the following question.

Explanation:

The following statement are the synchronous type of training because it is the type of training which is given to students or the persons for the purpose of knowledge in present time and the trainer or that person who give them information they can receive feedback and message at that time and all persons has permission to ask questions with them.

Option C is incorrect because in this type of training the interaction between the trainer and the receiver could not be established.

Option A is incorrect because the classroom-based training only for that person or the students who are available at that time at that place and in this video conferencing is not available.

8 0
3 years ago
What type of file format is PSD?
Ronch [10]

Answer:

PSD (Photoshop Document)

Explanation:

PSD (Photoshop Document) is an image file format native its one of Adobe's popular Photoshop Application. PSD files are commonly used for containing high quality graphics data.

8 0
2 years ago
Read 2 more answers
A PC is not able to connect to a wired network. Pinging the loopback address is successful, but the gateway cannot be reached. O
tangare [24]
Usually that means a physical connection - so either a loose or faulty ethernet cord.
5 0
2 years ago
Can I get money for the cars which I sell in my showroom mod in gta v(5)
nikitadnepr [17]

Answer:

Yes you can

Explanation:

5 0
2 years ago
Examples of applying successful visual design principles to bring a web page together are _________________. (Choose all that ap
EleoNora [17]

Answer:

I believe it's b

Explanation:

I'm straight

8 0
2 years ago
Other questions:
  • Question 5
    5·1 answer
  • The ________ of the operating system enables users to communicate with the computer system. Select one: A. user interface B. mod
    15·1 answer
  • Which of the following should be the first page of a report?
    11·1 answer
  • What is the protocol in the web search at the bottom?
    13·1 answer
  • Files with what two file extensions are commonly known as tarballs??
    8·1 answer
  • If you delete a conversation many times with someone like this, will you stop receiving messages from them?
    13·1 answer
  • Where can elicitation techniques be used?
    12·1 answer
  • 1)What is the hydropower resources/energy?
    7·1 answer
  • How does the number of jobs in internet media compare to the number of jobs in tv broadcasting and print media?
    11·1 answer
  • 1. The letters that appear after the dot after a file name are called the:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!