) Accept 3 inputs 1. A vector of structs containing the 2. The name of the field as a chara 3. A number (1 or 2), 1 for ASCEND Convert your vector of structures to Sort the table based on the user's ch

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
Problem C
A file containing patient info called 'patient.xlsx' contains the following info in columns: name, age (years), heart
rate (beats per min), and oxygen saturation (%).
Write a function that will accomplish the folowing:
a) Accept 3 inputs
1. A vector of structs containing the information from the file
2. The name of the field as a character vector
3. A number (1 or 2), 1 for ASCENDING, and 2 for DESCENDING
b) Convert your vector of structures to a table
c) Sort the table based on the user's choice of field name and whether it is in ASCENDING or
DESCENDING order
d) Return the sorted table
Write a script file that will accomplish the following:
a) Load the data from the file into MatLab
b) Use a loop to create a vector of structs that contain the information in the dataset from the file
c) Prompt the user for the name of a field and store it as a character vector
d) Prompt the user for a number, 1 to indicate ASCENDING and 2 to indicate DESCENDING
e) Call your function to produce a sorted table based on the user's cholces
Transcribed Image Text:Problem C A file containing patient info called 'patient.xlsx' contains the following info in columns: name, age (years), heart rate (beats per min), and oxygen saturation (%). Write a function that will accomplish the folowing: a) Accept 3 inputs 1. A vector of structs containing the information from the file 2. The name of the field as a character vector 3. A number (1 or 2), 1 for ASCENDING, and 2 for DESCENDING b) Convert your vector of structures to a table c) Sort the table based on the user's choice of field name and whether it is in ASCENDING or DESCENDING order d) Return the sorted table Write a script file that will accomplish the following: a) Load the data from the file into MatLab b) Use a loop to create a vector of structs that contain the information in the dataset from the file c) Prompt the user for the name of a field and store it as a character vector d) Prompt the user for a number, 1 to indicate ASCENDING and 2 to indicate DESCENDING e) Call your function to produce a sorted table based on the user's cholces
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 trees
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
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