3d frame analysis matlab