%% Modify Lines After Creation
% Define |x| as 100 linearly spaced values between $-2\pi$ and $2\pi$.
% Define |y1| and |y2| as sine and cosine values of |x|. Create a line plot of
% both sets of data and return the two chart lines in |p|.

% Copyright 2015 The MathWorks, Inc.

x = linspace(-2*pi,2*pi);
y1 = sin(x);
y2 = cos(x);
p = plot(x,y1,x,y2);

%% 
% Change the line width of the first line to 2. Add star markers to the
% second line. Starting in R2014b, you can use dot notation to set
% properties. If you are using an earlier release, use the
% <docid:matlab_ref.f67-432995> function instead.

p(1).LineWidth = 2;
p(2).Marker = '*';