EBK MATLAB: AN INTRODUCTION WITH APPLIC
EBK MATLAB: AN INTRODUCTION WITH APPLIC
6th Edition
ISBN: 8220103113663
Author: GILAT
Publisher: YUZU
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:

EBK MATLAB: AN INTRODUCTION WITH APPLIC, 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!

Chapter 4 Solutions

EBK MATLAB: AN INTRODUCTION WITH APPLIC

Knowledge Booster
Background pattern image
Electrical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, electrical-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:PEARSON
Text book image
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:9781337900348
Author:Stephen L. Herman
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Electrical Engineering
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Text book image
Fundamentals of Electric Circuits
Electrical Engineering
ISBN:9780078028229
Author:Charles K Alexander, Matthew Sadiku
Publisher:McGraw-Hill Education
Text book image
Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:9780134746968
Author:James W. Nilsson, Susan Riedel
Publisher:PEARSON
Text book image
Engineering Electromagnetics
Electrical Engineering
ISBN:9780078028151
Author:Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:Mcgraw-hill Education,
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