Question

MATLAB The following are three vectors representing the age (years), height (cm) and weight (kg) of...

MATLAB

The following are three vectors representing the age (years), height (cm) and weight (kg) of ten girls.

A = [ 12 13 13 14 16 14 15 12 13 12];

H = [143 158 161 150 159 159 150 144 157 137];

W = [ 39 48 49 42 51 51 47 31 43 31];

a) Calculate the average of all vectors (age, height and weight). Put all three means in a column vector named mean_ahw. (Use function mean to calculate the averages.)

b) How many girls in the group are taller than 150cm? Put the result in a variable named n150.

c) What is the average weight of girls of age 13 or younger? Put the result in a variable named mw13.

d) How many girls are taller than the average and at the same time have weight below the average? Put the result in a variable named ntall.

e) Is the oldest girl also the tallest? Write the code so that it is checking whether the index of the oldest girl is compared with the index of the tallest one. Put your result in a variable named age_height_check, which should have a value 0 (for false) or 1 (for true). (For finding the oldest/tallest girl use function max.)

Homework Answers

Answer #1

Please give thumbs up, thanks

Sample output:

code:

A = [ 12 13 13 14 16 14 15 12 13 12];
H = [143 158 161 150 159 159 150 144 157 137];
W = [ 39 48 49 42 51 51 47 31 43 31];
%a
mean_ahw(1)=mean(A);
mean_ahw(2)=mean(H);
mean_ahw(3)=mean(W);
%b
n150=sum(H>150)
%c
mw13=mean(W(A<=13))
%d
sum(H>mean(H))+sum(W<mean(W))
%e
find(A==max(A))==find(H==max(H))

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Student What is your height in inches? What is your weight in pounds? What is your...
Student What is your height in inches? What is your weight in pounds? What is your cumulative Grade Point Average (GPA) at FTCC or your primary college? How many hours do you sleep each night? 1 67 100 4 7 2 62 105 4 5 3 72 120 4 8 4 61 125 4 7 5 56 105 3.7 6 6 61 120 4 7 7 65 172 3.8 7 8 72 235 3.22 5 9 63 135 4 6...
Is there an association between patient BMI and cholesterol level at screening? Consider overweight, normal and...
Is there an association between patient BMI and cholesterol level at screening? Consider overweight, normal and underweight categories for BMI. Do a Chi-Square. I am having trouble finding the test statistics. I picked the level of significance to be 5%. Patient ID Drug Sex Age Height BMI Weight Cholesterol 1 B F 22 67.13 21.52787 138 197 2 B M 22 63 20.36911 115 181 3 B F 22 72 25.76582 190 190 4 A M 22 69 16.98068 115...
Question 1 2 pts Let x represent the height of first graders in a class. This...
Question 1 2 pts Let x represent the height of first graders in a class. This would be considered what type of variable: Nonsensical Lagging Continuous Discrete Flag this Question Question 2 2 pts Let x represent the height of corn in Oklahoma. This would be considered what type of variable: Discrete Inferential Distributed Continuous Flag this Question Question 3 2 pts Consider the following table. Age Group Frequency 18-29 9831 30-39 7845 40-49 6869 50-59 6323 60-69 5410 70...
While job opportunities for men and women are considerably more balanced than they were 40 years...
While job opportunities for men and women are considerably more balanced than they were 40 years ago, the career aspirations may still differ. Is there a difference in majors chosen by men and women? Using the sample of 200 MBA students (in the data file), conduct a Chi Square Test of Independence to determine if one's choice of major is independent of their gender. Use a .05 significance level. ID Gender Major Employ Age MBA_GPA BS GPA Hrs_Studying Works FT...
DIRECTIONS: This is an open book, take home examination. You may look up the answers and...
DIRECTIONS: This is an open book, take home examination. You may look up the answers and discuss them, if you wish. The Multiple Choice questions will be worth 1 point each and the essay questions will be worth 25 points each. This examination is over Chapters 6 through 9. MULTIPLE CHOICE: 1. During Piaget's concrete operational stage, children a. are more egocentric than they were during the preoperational period. b. often confuse appearances with reality. c. are unable to reverse...
MATHEMATICS 1. The measure of location which is the most likely to be influenced by extreme...
MATHEMATICS 1. The measure of location which is the most likely to be influenced by extreme values in the data set is the a. range b. median c. mode d. mean 2. If two events are independent, then a. they must be mutually exclusive b. the sum of their probabilities must be equal to one c. their intersection must be zero d. None of these alternatives is correct. any value between 0 to 1 3. Two events, A and B,...
Bivariate Data & Probability After completing the calculation by hand in Q1 you can use Excel...
Bivariate Data & Probability After completing the calculation by hand in Q1 you can use Excel to check your answers before submitting. Q2 assesses your general understanding of probability and linear associations using Excel to analyse a large dataset. Question 1       Covariance and Correlation The table below shows a set of sample bivariate data. Calculate the covariance and correlation coefficient by completing the below table. Show all working. X Y (X - ) (Y - ) (X - )(Y -...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT