Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Matlab . . 1. Write a Matlab script that will do the following: Ask the user to enter the name of a data file. No
Matlab
. . 1. Write a Matlab script that will do the following: Ask the user to enter the name of a data file. No need to error check - use the file "MenuData1.txt". Assign variables x and y, where the top row in the data file is x and the bottom row is y. Allow the user to pick one of five colors (your choice) for the plot symbol (use a menu and switch-case). Use the subplot command to plot: o x and y using a star symbol and the user's chosen color o x and y using a circle symbol and the user's chosen color Add the titles: "Using Star" and "Using Circle" above the appropriate subplot, like this: . . Figure 1 FeEdit Viewer Tools Desktop Window Help Using Star Using Circle 40 36 35 30 30 O 25 O 20 20 15 OOOO 10 10 5 000 0 30 10 30 . NOTE: The goal of this problem is to practice switch case and plotting. The program might end up being a bit inefficient for this problem, and in this case it is okay. 2. In your same script, create variable NewVar, which contains the following matrix: [1358; 2416]. Use nested looping to count how many odd numbers appear in NewVar. Display this result to the screen Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started