Found the following article http://www.prist.ru/info.php/articles/group_delay.htm asking for help translating equation (4) into matlab