Parse .mat file