OBJECTIVE
Provide 2 approaches to transfer data from Stata to Matlab
Method 1: by .csv file
In Stata:
use old.dta
outsheet * using new.csv , comma replace
In Matlab:
Tab = readtable('new.csv');
Method 2: by .json file
In Stata:
use old.dta
jsonio out, what(data) file(new.json)
jsonio donot support writing UTF-8 content to disk in some operations system.
In Matlab:
tmp = freadjson('new.json');
Tab = struct2table(tmp.data);