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
Any idea how to make my simple python projects such as guess the number, mad libs, etc. even better?
-Dominant- [34]

Answer: Person's name.

Explanation:

3 0
2 years ago
Read 2 more answers
If you were to design a range of athletic shoes for various sports activities, what key factors would you consider during the de
mylen [45]
With this you just have to think about what do different shoes do and why? For example, track shoes need to be extremely light to make it so the runners don't need to move excess weight to accelerate faster whereas basketball shoes can be heavier because they need high ankle coverage for more ankle support during moves like the crossover. Then the key factors that I would do personally are: difficulty to produce, benefit to athlete, cost to athlete, weight, and support. My advice would be to systematically go through a bunch of sports and talk about each of their shoes...
4 0
3 years ago
When cleaning a computer, you need only worry about what you can see.
almond37 [142]

Answer:

False because the inside could be dirty and cause problems.

Explanation:

4 0
3 years ago
You want to create a directory called ~/Documents/papers, but you’re not sure that the ~/Documents directory exists. What comman
SCORPION-xisa [38]

Answer: e) mkdir -p ~/Documents/papers

Explanation:

As the question says we want to create a directory called ~/Documents/papers, but we are not sure whether it exist or not so we would type the command for making directory starting with mkdir.

Here mkdir means make directory. Followed by mkdir we will use -p. Here p is used to create all the directories for getting us the directory we want and its advantage is that it would ignore all the errors if the directory already exist.

Followed by the name of the directory that we want to create.

So the desired answer for the given condition would be mkdir -p ~/Documents/papers

5 0
3 years ago
Which delivery model is an example of a cloud computing environment that provides users with a web based email service ?
Evgen [1.6K]

Cloud computing, also known as cloud services, cloud concepts or simply the cloud, is a paradigm that allows to offer computer services. through a network, which is usually the Internet.

(data persistence, authentication, messaging, etc.). for example, a Linux system, a web server, and a programming environment such as Perl or Ruby).

Commercial examples are Google App ,Microsoft Azure,

3 0
3 years ago
Read 2 more answers
Other questions:
  • 80% OF QUESTIONS ARE ANSWERED IN UNDER 10 MINUTES why not mine
    15·2 answers
  • Which of the following statements is true about a file stream?
    5·1 answer
  • What will be the output after the following code is executed? def pass_it(x, y): z = y**x return(z) num1 = 3 num2 = 4 answer = p
    7·1 answer
  • You are almost finished updating a Website. As part of the update, you have converted all pages from HTML 4.0 to HTML5. The proj
    7·1 answer
  • Even if you cannot afford it you should donate at least 5 of your earnings to charity true or false
    8·1 answer
  • (d) What other services beside cloud-based software may be provided by Internet hosts?[1]
    11·1 answer
  • a term to describe article that can be displayed in their entirety as opposed to abstract and reference only?​
    10·1 answer
  • In which of the following phases of filmmaking would a production team be focused on the
    10·2 answers
  • Create a variable in php to store your university information and parse using jQuery Ajax and print your name. The variable must
    12·1 answer
  • To stored three characters a computer occupies. Bytes memory space
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!