function numterms = template_function(in)
% function numterms = template_function(in)
%
% Function template
%
% Run with 
% >> template_function(56)
% or 
% >> template_function(56);
% to not print out returned value.

% 00/05/18  Written


%--- init
fprintf('in = %i\n', in); 


%--- main
powertwo = log2(in);
fprintf('powertwo = %f\n', powertwo); 

% ceil is ceiling function; type 'help ceil' for more info
% floor rounds toward negative infinity; type 'help floor' for more info
roundup = ceil(powertwo);
fprintf('roundup = %f\n', roundup); 

nextpowertwo = 2^roundup;
fprintf('nextpowertwo = %f\n', nextpowertwo); 

numterms = pi;

return;

