added halfsins.m