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
A restaurant bill comes to $28.35. Find the total cost if the tax is 6.25% and a 20% tip is left on the amount before tax.​
Salsk061 [2.6K]

Not sure how this is computers and technology

3 0
3 years ago
Write a loop to output the word EXAM 99 times
worty [1.4K]

Answer:

Following are the answer for the given question

for(int i=1;i<=99;++i) // for loop

{

cout<<"EXAM"<<endl; // display the word EXAM

}

Explanation:

In this question we using for loop which is iterating 99 times and print the

word "EXAM  " 99 times.

The variable i is initialized by 1 and check the condition if the condition in loop  is true it will execute the loop and print "EXAM" .The loop will executed 99 times when the condition in loop is false then loop become terminated.

Following are the program in c++

#include<iostream>// header file

using namespace std;

int main() // main method

{

for(int i=1;i<=99;++i) // for loop

{

cout<<"EXAM"<<endl; // display the word EXAM

}

   return 0;

}

3 0
3 years ago
Select the correct statement(s) regarding digital baseband modulation.
NeTakaya

Answer:

The answer is "Option d".

Explanation:

The electronic firmware synchronization was its method where even the series of bytes is amplified even before the transmission process into to the sound waves and, thus, and in conceptual "1s" and "0s" represented by large font, wavelengths, or switching frequency.

  • QAM utilizes both magnitudes of the transporter and adjustments in the phase shift.
  • Rational data is represented by \frac{\pi}{2} cartesian coordinates for both the carries waves of the same wavelengths and represents the result in total.
6 0
3 years ago
What is the main difference between a literacy society and a digital Society
EleoNora [17]
The accurate answer is

The difference is a Literacy Society is a program for encouraging people to read.
A Digital Society is a program that as to do with technology at work,school, or at home.

Glad to help :) 
7 0
3 years ago
A(n) _______ attack attempts to make a server or network unavailable to serve legitimate users by flooding it with attack packet
malfutka [58]

Answer:

DoS or Denial of Service

Explanation:

Have a nice day! :)

3 0
2 years ago
Other questions:
  • The PATH environment variable.
    5·1 answer
  • Given an array of n distinct integers,d = [d[0], d[1],.., d[n - 1]], and an integer threshold, t, how many (a,b,c) index triplet
    11·1 answer
  • Which of the following function headings arevalid? If they are invalid, explain why.
    12·1 answer
  • Which industry has the highest employment figure for both teen and young adults in July, 2014?
    6·1 answer
  • A 'array palindrome' is an array which, when its elements are reversed, remains the same (i.e., the elements of the array are sa
    6·1 answer
  • What is virtualization?
    11·2 answers
  • Describe how data is transmitted using half-duplex serial data transmission.
    9·1 answer
  • Hiya people. I am a game developer and I need an idea for a new game. If you have any ideas, pls feel free to tell me. Best idea
    6·2 answers
  • You received an email message stating that your mother's bank account is going to be forfeited if you do not respond to the emai
    6·1 answer
  • After creating a webpage with html code, what do you need to do so that others can access it on the internet?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!