add matlab reference code