MG 20 (create a specified custom function) Create a Function - [Problem written by Ryan] A person works out 4 days over the course of a week and is trying to calculate their range of steps for days they work out versus the days they do not. They decided data by using the number of steps each day that their watch collected over a two week span. Instead of assigning each day as a workout day or a nonworkout day, ti just assume workout days are any day that their step count is above the median step count for the two week span. Write a function that analyzes her steps (in thousands) in vector s (already created in given code) This function should categorize their steps into separate arrays fom and non-workout days. It should then output the range for workout days as a 12 array named Max Step Range and output the range for non-workout days as a 1x2. named Min_Step_Range. These arrays should posess the minimum value in the first column and the maximum value in the second column. For any help refer to Chapter 3 in the textbook Function H Save C Reset MATLAB Docu

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
MG 20 (create a specified custom function)
My Soluti
Create a Function - [Problem written by Ryan]
A person works out 4 days over the course of a week and is trying to calculate their range of steps for days they work out versus the days they do not. They decided to analyze the
data by using the number of steps each day that their watch collected over a two week span, Instead of assigning each day as a workout day or a nonworkout day, they decide to
just assume workout days are any day that their step count is above the median step count for the two week span.
Write a function that analyzes her steps (in thousands) in vector s (already created in given code). This function should categorize their steps into separate arrays for workout
and non-workout days. It should then output the range for workout days as a 1x2 array named Max Step Range and output the range for non-workout days as a 1x2 array
named Min_Step Range. These arrays should posess the minimum value in the first column and the maximum value in the second column.
For any help refer to Chapter 3 in the textbook.
Function o
H Save
C Reset
I MATLAB Documentation
1 function [Max Step Range, Min Step Range) - stepcounter(s) Xs 15 vector of steps for two week span
Code to call your function e
C Reset
1s [22 24 10 24 19 9 13 17 25 25 10 25 25 16];
2 (RImax, R1nin]- stepcounter(s)
52- (22 10 15 24 22 25 19 8 23 24 20 21 21 15];
*(R2max,
R2min) Result2 stepcounter(s2)
Run Function
rei
enb
Transcribed Image Text:MG 20 (create a specified custom function) My Soluti Create a Function - [Problem written by Ryan] A person works out 4 days over the course of a week and is trying to calculate their range of steps for days they work out versus the days they do not. They decided to analyze the data by using the number of steps each day that their watch collected over a two week span, Instead of assigning each day as a workout day or a nonworkout day, they decide to just assume workout days are any day that their step count is above the median step count for the two week span. Write a function that analyzes her steps (in thousands) in vector s (already created in given code). This function should categorize their steps into separate arrays for workout and non-workout days. It should then output the range for workout days as a 1x2 array named Max Step Range and output the range for non-workout days as a 1x2 array named Min_Step Range. These arrays should posess the minimum value in the first column and the maximum value in the second column. For any help refer to Chapter 3 in the textbook. Function o H Save C Reset I MATLAB Documentation 1 function [Max Step Range, Min Step Range) - stepcounter(s) Xs 15 vector of steps for two week span Code to call your function e C Reset 1s [22 24 10 24 19 9 13 17 25 25 10 25 25 16]; 2 (RImax, R1nin]- stepcounter(s) 52- (22 10 15 24 22 25 19 8 23 24 20 21 21 15]; *(R2max, R2min) Result2 stepcounter(s2) Run Function rei enb
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education