Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Matlab HW5-1 Write a script (M-file) for the following a= (-360:360)pi/180; b = 4*sin(2*a); 1. Plot b against a with black line, draw marker style
Matlab
HW5-1 Write a script (M-file) for the following a= (-360:360)"pi/180; b = 4*sin(2*a); 1. Plot b against a with black line, draw marker style [red *] where the values of b are positive, and marker style [green circle] where the values of b are negative on the same graph. 2. Now create another variable c equal to the 2*cosine of a. i.e. c = 2*cos(a); Plot c against a with red line. 3. Plot both the graphs on the same figure and show their maximum and minimum values as shown below [use marker style (cyan *) for maximum values and marker style (magenta square) for minimum values] W % Student's ID: LS****** % Student's Name: ****** % input your answer here for HW5-1 HW5-2. Create a 3x2 subplot and do the following 1. Plot the function e-0.3x (sin(x) - jcos(x)), x ranges from 0 to 4pi in increments of pi/20.[ Display real part with cyan solid line and imaginary part with magenta dashed line] 2. Plot discrete sequence data for the above function [ Display real part with black color and imaginary part with red color] 3. Plot bar graph for the above function [real part only with blue color] 4. Polar plot showing magnitude versus angle. [Use Compass Plot] 5. Plot both functions e-** sin(x) [with blue line, x ranges from -2*pi to 0] & -e* sin(x) [with red line, x ranges from 0 to 2*pi] using fplot 6. Suppose that Zhang, Li, Qian, Chen, and Zhao contributed 5, 15, 5,30, and 15, respectively, to buy a colleague's Wedding present. Create a pie chart of their contributions. What percentage of the cost was paid by Chen? % Student's ID: LS****** % Student's Name: ****** % input your answer here for HW5-2 HW5-1 Write a script (M-file) for the following a= (-360:360)"pi/180; b = 4*sin(2*a); 1. Plot b against a with black line, draw marker style [red *] where the values of b are positive, and marker style [green circle] where the values of b are negative on the same graph. 2. Now create another variable c equal to the 2*cosine of a. i.e. c = 2*cos(a); Plot c against a with red line. 3. Plot both the graphs on the same figure and show their maximum and minimum values as shown below [use marker style (cyan *) for maximum values and marker style (magenta square) for minimum values] W % Student's ID: LS****** % Student's Name: ****** % input your answer here for HW5-1 HW5-2. Create a 3x2 subplot and do the following 1. Plot the function e-0.3x (sin(x) - jcos(x)), x ranges from 0 to 4pi in increments of pi/20.[ Display real part with cyan solid line and imaginary part with magenta dashed line] 2. Plot discrete sequence data for the above function [ Display real part with black color and imaginary part with red color] 3. Plot bar graph for the above function [real part only with blue color] 4. Polar plot showing magnitude versus angle. [Use Compass Plot] 5. Plot both functions e-** sin(x) [with blue line, x ranges from -2*pi to 0] & -e* sin(x) [with red line, x ranges from 0 to 2*pi] using fplot 6. Suppose that Zhang, Li, Qian, Chen, and Zhao contributed 5, 15, 5,30, and 15, respectively, to buy a colleague's Wedding present. Create a pie chart of their contributions. What percentage of the cost was paid by Chen? % Student's ID: LS****** % Student's Name: ****** % input your answer here for HW5-2Step 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