Added extracting data to .mat