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
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:12| Question number:12.12
All Answers
total answers (1)
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