Matlab help
DUE=only 5 hours
Problem 1: Function Assignment (due on Monday, November 3rd by noon)
At the start of the semester we looked at getting Matlab to draw a circle. Use this as the first step in drawing a face. Following that train of thought, create the following functions that return sets of x and y data for plotting. Create a main script (program) that asks the user which emotion to show and then draws the appropriate face by calling the functions for data. The switch structure should be used for this. For straight lines (if needed) you do not need to call a function but can code this directly into your main program.
You will need to use the “hold” command discussed in class.
Just to be clear, your functions should generate sets of x and y data that your main program will then plot.
Submit your functions and main program to D2L. The main program should be named “emotions.m”.
Hint: You will need to use the hold command to plot all of the data on one Figure.
Functions to create:
? Draw a circle of given radius and location. Function name “mycircle”.
? Draw an arc of given radius, location, and angle. Function name “myarc”.
Emotions to show:
? Happy (Eyes open, smile)
? Sad (Eyes open, frown)
? Asleep (Eyes closed, straight line mouth)
? An additional emotion of your choosing
12 years ago
40
- Lily Co. paid a dividend of $5.25 on its
- Reference tables
- Suppose the U.S. returns millions of illegal immigrant workers to Mexico. Show the effects of this policy on w, L<subscript>f...
- Business Letter Why your school should not have uniforms
- projectt
- Unit 10 Project Case - The Case of the Hurricane Club
- mrs.patel brought 124 strawberrie sto the party she wants to share with 8 people how many strawberries do each person...
- Problem 1 - Red Sauce Canning Company processes tomatoes into catsup, tomato juice, and canned tomatoes. During the summer of 20X2, the joint costs of processing the tomatoes were $420,000. There was no beginning or ending inventories for the summer
- 1) Call center typically have high turnover. The director of human resources for a large bank has compiled data on about 70 former employees at one of the bank’s call centers in the Excel file Call Center Data. In writing an article about call center w
- Here are the summary statistics for the Olympic long jumps and high jumps displayed inSummer 2004.EventLong JumpHigh JumpMean StdDev316.04 20.8583...