Categories: Uncategorized

MATLAB Input and Output

MATLAB Input and Output
Requirements
1) You will create a separate MATLAB script file (.m file) for each question.
2) You will name each script using the following naming convention
a. YOURLASTNAME_MATLAB_logic_problem_01.m
b. YOURLASTNAME_MATLAB_logic_problem_02.m
c. YOURLASTNAME_MATLAB_logic_problem_03.m
d. YOURLASTNAME_MATLAB_logic_problem_04.m
e. Etc.
3) You will upload all your files to Blackboard at the same time, one submission, do NOT submit
each script as separate submissions. To do this you will need to attach all of your files at the same
time.
Questions
1) Write a MATLAB script to prompt a user to input two numbers, then assess whether the two
numbers are equal or not. If the two numbers are equal, display that they are equal in the
Command Window. If they are not equal, display that they are not equal in the Command
Window.
2) Write a MATLAB script that prompts the user to enter the day of the week using the input
function. If the information the user enters is equal to “Saturday” or “Sunday”, display “have a
nice weekend” in the Command Window. Otherwise, display “Good luck in your class lectures
and your studies.”
3) Write a MATLAB script that prompts the user to input the following array by providing an
example in the prompt: [2 4;6 3;5 9]. Check if the user has input the array properly. If the
information entered by the user is correct, display a statement to the Command Window
informing the user they have entered the array correctly. If the user has not entered the array
correctly, display a statement to the Command Window notifying the user that they have not
entered the array correctly.
4) Write a MATLAB script that prompts the user with the selection window provided on the next
page (using the menu command) and then saves the user’s response as ‘user_val’. Then, print the
string on the button associated with the user’s response in the command window.

admin

Share
Published by
admin

Recent Posts

Childbirth

For this short paper activity, you will learn about the three delays model, which explains…

9 months ago

Literature

 This is a short essay that compares a common theme or motif in two works…

9 months ago

Hospital Adult Medical Surgical Collaboration Area

Topic : Hospital adult medical surgical collaboration area a. Current Menu Analysis (5 points/5%) Analyze…

9 months ago

Predictive and Qualitative Analysis Report

As a sales manager, you will use statistical methods to support actionable business decisions for Pastas R Us,…

9 months ago

Business Intelligence

Read the business intelligence articles: Getting to Know the World of Business Intelligence Business intelligence…

9 months ago

Alcohol Abuse

The behaviors of a population can put it at risk for specific health conditions. Studies…

9 months ago