MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
6th Edition
ISBN: 9781119256830
Author: Amos Gilat
Publisher: John Wiley & Sons Inc
bartleby

Concept explainers

bartleby

Videos

Question
100%
Book Icon
Chapter 4, Problem 1P
To determine

The Body Mass index by taking the variables as input from user.

Expert Solution & Answer
Check Mark

Answer to Problem 1P

Solution:

The Body Mass index is 24.6.

Explanation of Solution

Given Information:

  • The mass of the person is 162lb.
  • The height of the person is 68in.
  • The BMI is calculated as BMI=703Wh2.

Formula to calculate the BMI is

    BMI=703Wh2

Where,

  • BMI is the Body Mass index.
  • W is the weight of person in lb.
  • h is the height of person in in.

Substitute 162lb for W and 68in for h to find BMI.

    BMI=703( 162lb) ( 68in )2=24.629324.6

Write the MATLAB script that calculates the Body Mass index by taking the variables as input from user.

MATLAB Code:

W = input('Enter the weight: ');

% Provide input to the variable W.

h = input('Enter the height: ');

% Provide input to the variable h.

BMI = round((703*W)/(h^2),1);

% Calculate the BMI.

fprintf('The BMI is: %f\n', BMI);

% Print the result.

Save the MATLAB script with name, Chapter1_56830_4_1P.m in the current folder. Execute the script by typing the script name at the command window to calculate the Body Mass index by taking the variables as input from user.

Result:

MATLAB: An Introduction with Applications, Chapter 4, Problem 1P

Conclusion:

Therefore, the Body Mass index is 24.6.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
08:34 ◄ Classroom 07:59 Probs. 5-32/33 D ا. 89 5-34. Determine the horizontal and vertical components of reaction at the pin A and the normal force at the smooth peg B on the member. A 0,4 m 0.4 m Prob. 5-34 F=600 N fr th ar 0. 163586 5-37. The wooden plank resting between the buildings deflects slightly when it supports the 50-kg boy. This deflection causes a triangular distribution of load at its ends. having maximum intensities of w, and wg. Determine w and wg. each measured in N/m. when the boy is standing 3 m from one end as shown. Neglect the mass of the plank. 0.45 m 3 m
Examine the Variables: Carefully review and note the names of all variables in the dataset. Examples of these variables include: Mileage (mpg) Number of Cylinders (cyl) Displacement (disp) Horsepower (hp) Research: Google to understand these variables. Statistical Analysis: Select mpg variable, and perform the following statistical tests. Once you are done with these tests using mpg variable, repeat the same with hp Mean Median First Quartile (Q1) Second Quartile (Q2) Third Quartile (Q3) Fourth Quartile (Q4) 10th Percentile 70th Percentile Skewness Kurtosis Document Your Results: In RStudio: Before running each statistical test, provide a heading in the format shown at the bottom. “# Mean of mileage – Your name’s command” In Microsoft Word: Once you've completed all tests, take a screenshot of your results in RStudio and paste it into a Microsoft Word document. Make sure that snapshots are very clear. You will need multiple snapshots. Also transfer these results to the…
Examine the Variables: Carefully review and note the names of all variables in the dataset. Examples of these variables include: Mileage (mpg) Number of Cylinders (cyl) Displacement (disp) Horsepower (hp) Research: Google to understand these variables. Statistical Analysis: Select mpg variable, and perform the following statistical tests. Once you are done with these tests using mpg variable, repeat the same with hp Mean Median First Quartile (Q1) Second Quartile (Q2) Third Quartile (Q3) Fourth Quartile (Q4) 10th Percentile 70th Percentile Skewness Kurtosis Document Your Results: In RStudio: Before running each statistical test, provide a heading in the format shown at the bottom. “# Mean of mileage – Your name’s command” In Microsoft Word: Once you've completed all tests, take a screenshot of your results in RStudio and paste it into a Microsoft Word document. Make sure that snapshots are very clear. You will need multiple snapshots. Also transfer these results to the…

Chapter 4 Solutions

MATLAB: An Introduction with Applications

Knowledge Booster
Background pattern image
Statistics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc
Text book image
Probability and Statistics for Engineering and th...
Statistics
ISBN:9781305251809
Author:Jay L. Devore
Publisher:Cengage Learning
Text book image
Statistics for The Behavioral Sciences (MindTap C...
Statistics
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning
Text book image
Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON
Text book image
The Basic Practice of Statistics
Statistics
ISBN:9781319042578
Author:David S. Moore, William I. Notz, Michael A. Fligner
Publisher:W. H. Freeman
Text book image
Introduction to the Practice of Statistics
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman
Matrix Operations Full Length; Author: ProfRobBob;https://www.youtube.com/watch?v=K5BLNZw7UeU;License: Standard YouTube License, CC-BY
Intro to Matrices; Author: The Organic Chemistry Tutor;https://www.youtube.com/watch?v=yRwQ7A6jVLk;License: Standard YouTube License, CC-BY