calculated v and a from eric, added matlab code form extract