% Script/Function Filename:
%     getApproximation.m
% Purpose:
%     Enter the purpose of the function/file here
%     
% Record of modifications:
%     Programmer(s): {Your Name}
%     Date Due: YYYY-MM-DD
%     Date Submitted: YYYY-MM-DD
%     References: ????
%     Help Received: ????
%     
% Variables Used:
%     Enter the variables that you use here
function [] = getApproximation( ~ , ~ )
info = get( 0 , 'UserData' );
angle = get( info{ 1 } , 'value' );
app = myTaylorApproximation( angle );
act = cosd( angle );
approximate = info{ 2 };
actual = info{ 3 };
txt = info{ 4 };
comparison = sprintf( '%0.5f vs %0.5f' , app , act );
set( approximate , 'XData' , angle , 'YData' , app );
set( actual , 'XData' , angle , 'YData' , act );
set( gca , 'YLim' , [ min( [ -1 app ] ) max( [ 1 app ] ) ] );
set( txt , 'string' , comparison );
end