Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(MATLAB) Make a script called hw6q1.m that does the following: a) Creates pop-up windows that ask the user for their name and age. b) Checks

(MATLAB) Make a script called hw6q1.m that does the following: a) Creates pop-up windows that ask the user for their name and age. b) Checks to make sure that the users age is between 10 and 120. If their given age is in this range, the script should proceed to part (c). If it is not, make a warning message pop up that says either: You must be at least 10 years old. or If youre really over 120 years old, more power to you but I dont quite believe you. depending on which response is appropriate. Then the code should return to part (a), i.e., asks the user again to enter their name and age keep repeating this if necessary. Hint: see the help/documentation for the waitfor command (if it helps). c) Makes a pop-up window that has the following text: How much do you like this class? And have 3 buttons below this text that the user can click on. Choose three different text options for the buttons. The labels are your choice, but the left-most should be the lowest (worst) rating, and the rightmost the highest (best) rating. Set the middle button to be the default. d) Saves all of the users information (name, age, class rating) to a struct data type called studentStruct with fields Name, Age, and ClassRating. e) Creates another pop-up window that asks the user whether there is another student to enter data for (options should be Yes or No, with No as default). If the user answers Yes, then all of the code for parts a-d should be executed again, with the second users info being saved to a new entry in studentStruct. Repeat as many times as the user says Yes. If the user answers No, then save a .mat file with studentStruct. The file name should be called XstudentsData.mat, where X is replaced by the number of students with data in the structure. E.g., if 1 student enters info, then clicks Yes in part (f), and a second student enters info and then clicks No in part (f), the file should be called 2studentsData.mat. If a third student had entered info, it would be 3studentsData.mat.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

State the difference between unadjusted and adjusted basis.

Answered: 1 week ago

Question

=+d. Which projects should Hotel Amazing implement? Why?

Answered: 1 week ago

Question

Does it avoid typos and grammatical errors?

Answered: 1 week ago