%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This 'functionEvaluation()' computes the position coordinates of the left-top corner of the small matrix that is to be super-imposed
% on a big matrix to form experiment movie file of translational motion.
%
% Programmer : Nilesh Ghubade (nileshg@temple.edu)
% Date : Aug 2002
% Advisor : Dr.Longin Jan Latecki (latecki@temple.edu)
% Project : Video Analysis (extracting key frames from a given movie file)
% Department : Computer and Information Science Department, Temple University, Philadelphia, PA-19122, USA
%
% Input arguments:-
% functionDefn = Trigonometric function for example sin(x).
%
% Output : 
% 'coords.txt' containing matrix of 2 columns whose first column is the row coordinate and 2nd column is the column coordinate of the
% left-top corner position of the small matrix.
%
% Example : functionEvaluation('sin(x)');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function functionEvaluation(functionDefn)
initialx = pi/180;
xIncrement = 10;
for count=1:40
    x = initialx * xIncrement * count;
    xValues(count) = x;
    yValues(count) = eval(functionDefn);
    coordsMatrix(count,1) = abs(round(yValues(count)*50));
    coordsMatrix(count,2) = abs(round(xValues(count)*50));
    
end

save coords.txt coordsMatrix  -ASCII