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]
3 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]3 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
True or False: From an antiterrorism perspective, espionage and security negligence are considered insider threats.
Oksanka [162]
MAYBE is false...............
6 0
3 years ago
Read 2 more answers
Which of the following websites can help you learn about general career trends? A. Bureau of Labor Statistics B. Career Cruising
Alik [6]
B hope this helps, can you make me brainliest if it is right?
7 0
4 years ago
Words like "free" or "percent off" will not only trigger spam filters for your email, but will also ___________
weeeeeb [17]

Answer:

eliminasnados

Explanation:

6 0
3 years ago
What are several different types of software, which sit in the middle of and provide connectivity between two or more software a
brilliants [131]

Answer:

The answer to the given question is the option "a".

Explanation:

In this question, the answer is "middleware" software because this software works between the operating system and the applications that provide connectivity to two or more software applications. for example database, application server, etc and other choices that are not correct can be described as:

  • In option b, The integration middle wear represents the software of the system. It does not coordinate between operating and application software.
  • In option c, It is used to manage the data and the information for the process.
  • In option d, It includes the hardware, software and the networks. In this hardware and software link for use software.

That's why the answer to this question is the option "a".

6 0
3 years ago
Which of the following are considerations in e-commerce and e-government Internet sites? Check all of the boxes that apply.
vovangra [49]

Answer:

protection of sensitive information

Explanation:

6 0
3 years ago
Other questions:
  • Jean-Ann works in the finance business. She analyzes insurance applications in order to determine the level of risk involved in
    11·1 answer
  • Using the CPI to calculate the inflation rate​ _______________ the underlying inflation​ rate, and using the core inflation rate
    7·2 answers
  • What commands will reset a network interface in Linux?
    13·1 answer
  • A friend of yours is having trouble getting good Internet service. He says his house is too remote for cable TV—he doesn’t even
    11·1 answer
  • A(n) ____ is a location on your computer screen where you type text entries to communicate with the computer’s operating system.
    9·2 answers
  • Discuss whether the redundant data should be addressed prior to beginning the wireless network architecture project, in coordina
    11·1 answer
  • To improve at keyboarding, it is a good idea to master frequently typed words.
    14·2 answers
  • Consider the following code segment.
    11·1 answer
  • Question #2
    11·1 answer
  • Voice of the customer, Social Media Analytics, churn analysis, survey analysis, and market research analytics are more likely to
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!