.st0{fill:#FFFFFF;}

Fitness Tracker with MATLAB 

 September 18, 2019

By  Ceethal Piyus

Introduction

As per the records of WHO the prevalence of obesity in the world has risen to epidemic proportions. This isn’t just limited to one part of the world. Nations everywhere have obese citizens. While some think that the richest and the most developed countries in the world are the most obese, this isn’t always the case. In fact, the United States and the United Kingdom are two of the most economically rich and developed countries in the world. However, they are only ranked 12th and 36th, respectively, when compared to other nations. There have been multiple nations with small economies that have been classified as the most obese, and as per the World Health Organization. The number of obese people in the world total is approximately 2.1 billion, which makes up about 30% of the total population. This number continues to rise. Over 3 million people each year die from obesity. 

In addition to dramatically decreasing a person’s lifespan, the quality of life of an obese person is affected. This is of major concern as excess fat distribution is strongly associated with different health risk conditions including higher risks of diabetes, heart disease and even certain types of cancer. Other health risks from obesity include osteoarthritis, kidney disease, strokes, and high blood pressure. Hence, a simple and effective measure of obesity is needed for risk assessment in order to guide appropriate management and develop preventive strategies.

Many people want to know the answer to this question: What should I eat? and How much should I weigh? we will be answering the second question through this blog, because the question of what you should eat is highly individualized. So let’s get into answering how much you should weight? However, there is not one ideal healthy weight for each person, because a number of different factors play a role. These include age, muscle-fat ratio, height, gender, and body fat distribution, or body shape.

So the motivation behind developing this application is to track the overall fitness as well as a healthy weight of a person by considering different obesity parameters such as Body Mass Index (BMI), Waist-Hip Ratio (WHR) and Waist-Height Ratio (WHtR). Combining all these three parameters is one of the best ways to get an accurate idea of whether or not you should consider changing your diet or exercise routine. This blog will demonstrate how BMI, WHR, and WHtR are calculated using different body parameters in MATLAB and how their score will impact your health and early prediction of obesity. This Fitness Tracker application is very helpful for anyone who is looking to make strides in their fitness. 

Now let's have an understanding of each parameter and how they are going to predict the health status of a person.

Body Mass Index (BMI)

Waist to Hip Ratio (WHR)

Waist to Height Ratio (WHtR)



Why BMI WHR and WHtR are selected over other parameters?

Prerequisites required

  • MATLAB Version above MATLAB R2016a
  • MATLAB App designer

Graphical User Interface

Six panels are used to create the complete look of this application. Once the app starts running, the user first sees the input / user panel. After clicking the "Show My Results" button, the app will take you to the next panel, the result panel. From the result panel, the user can view the score analysis of the BMI, WHR and WHtR, and the caution panel will provide an overview of various preventive measures. The entire graphical user interface was created using MATLAB App Designer, and the webinar video below explains how to create it.

Graphical user interface was created using MATLAB App Designer

Fig 4: Graphical user interface was created using MATLAB App Designer

Algorithm Design

Once the application panel is ready, the next step is to write the code to determine the behavior for the components, the following image shows the overall workflow of the application design.

Overall workflow of the application design

Fig 5: Overall workflow of the application design

so in the first stage, data acquisition, we will be collecting the different body parameters including gender, height , weight, waist circumference and hip circumference from the user side as an input to our application. These parameters are then used to calculate the BMI, WHR and WHtR. In the output stage there will be health risk level prediction with respect to your score and gender. There will be a individual score analysis as well as a general conclusion out of it, moreover this application will also give an idea about the precautions to be followed in order to maintain  healthy lifestyle.

Once the input parameters are obtained, the model will predict your health by following three steps: unit conversion, BMI, WHR, WHtR calculation, and finally risk level classification based on BMI, WHR and WHtR scores. In the coming sections, we will see the algorithms that were followed to perform these steps.

Overall algorithm design

Fig 6 : Overall algorithm design

Unit Conversion

BMI, WHR and WHtR calculation

Risk level classification based on BMI, WHR and WHtR scores

Results

Following are the results obtained by entering different body parameters of different people in the application.

Case 1: Person with Central Obesity or Belly Fat

Case 2: Highly Overweight Person with Central Obesity

Case 3: Healthy  Person with More Muscle Mass

Case 4: Underweight Person

The application accurately predicted overall health status in all four different cases

Conclusion

This fitness tracker intended to be the simple and straightforward application so that everyone can get the most out of it, whether they’re a beginner or a fitness pro. This application gives you a complete picture of your health than providing a general overview which might not be entirely accurate. It also overcomes the drawbacks of using BMI alone to predict health risk. It is also worth noting that the app has been able to accurately predict the health status of different people with different body parameters.

Learning about your BMI, WHR and WHtR rate is a positive step in the process of reaching or maintaining a healthy weight. The more you know, the easier it is to make changes in your life that produce real results. Track your BMI, WHR and WHtR scores, keep a weight loss or weight gain journal, gather support from friends and family, and connect with your healthcare team to find a plan that works over the long-term for you.

Limitations

Reference:

Watch the video below for the full code and try to replicate all the results yourself !

Get Standalone Application of Webinar

This Standalone has been created using MATLAB R2018b. Get the application running and start evaluating your fitness.

Standalone Application Installation Steps

Did you find some helpful content from our video or article and now looking for its code, model, or application? You can purchase the specific Title, if available, and instantly get the download link.

Thank you for reading this blog. Do share this blog if you found it helpful. If you have any queries, post them in the comments or contact us by emailing your questions to [email protected]. Follow us on LinkedIn Facebook, and Subscribe to our YouTube Channel. If you find any bug or error on this or any other page on our website, please inform us & we will correct it.

If you are looking for free help, you can post your comment below & wait for any community member to respond, which is not guaranteed. You can book Expert Help, a paid service, and get assistance in your requirement. If your timeline allows, we recommend you book the Research Assistance plan. If you want to get trained in MATLAB or Simulink, you may join one of our training modules. 

If you are ready for the paid service, share your requirement with necessary attachments & inform us about any Service preference along with the timeline. Once evaluated, we will revert to you with more details and the next suggested step.

Education is our future. MATLAB is our feature. Happy MATLABing!

About the author 

Ceethal Piyus

Image Processing & Signal Processing Expert with 4 years of experience in MATLAB Programming. Graduated with a Master’s in Technology degree from VIT University, Vellore, India

  • ananya gupta says:

    Hello, Nice content shared by you its really good and useful for me from which i understand concept very clear about Matlab.

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    Connect with MATLAB Helper ®

    Follow: YouTube Channel, LinkedIn Company, Facebook Page, Instagram Page

    Join Community of MATLAB Enthusiasts: Facebook Group, Telegram, LinkedIn Group

    Use Website Chat or WhatsApp at +91-8104622179

    >