%% Modify Existing Text
% Create a line plot and add two text descriptions along the line. Return the text objects, t.

x = linspace(-5,5);
y = x.^3-12*x;
plot(x,y)
t = text([-2 2],[16 -16],'dy/dx = 0')

%
% The text function creates one text object for each text description. Thus, t contains two text objects.
% Change the color and font size for the first text object using t(1). Use dot notation to set properties. If you are using an earlier release, use the set function instead.

t(1).Color = 'red';
t(1).FontSize = 14;

% Copyright 2015 The MathWorks, Inc.