Q:

Create an x vector that has 30 linearly spaced points in the range from -2π to 2π, and then y as sin(x). Do a stem plot of these points, and store the handle in a variable

0

 Create an x vector that has 30 linearly spaced points in the range from -2π to 2 π, and then y as sin(x). Do a stem plot of these points, and store the handle in a variable. Use get to see the properties of the stem plot, and then set to change the face color of the marker. Also do this using the dot operator.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch12Ex12.m

% Display a stem plot and modify the face color

% of the marker to red

x = linspace(-2*pi,2*pi,30);

y = sin(x);

hdl = stem(x,y);

xlabel('x')

ylabel('sin(x)')

title('Stem plot of sin')

get(hdl);

set(hdl,'MarkerFaceColor','r')

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now