function F = sinfun(x,r)
% m-file for general function
F = r*sin(pi*x);