input matlab.mp
prologues:=0;
beginfig(1)
%begin a matlab data plot
draw begingrf(5in,4in);
% read in column 1 of data file "sample_data"
% and store it as the 0th "data vector" in our repository
rdata("sample_data", 1);
% read in column 2 of data file "sample_data"
% and store it as the 1st "data vector" in our repository
rdata("sample_data", 2);
% plot out data, using vector 0 as X values, and vector 1 as Y values
% well, we have to make sure that the two vectors have the same
% lengths
mtplot("0 1");
ylabel("sample Y label $\alpha$");
xlabel("sample X label {\bf Bold} and {\it italic} ");
% do the post-processing
finishgrf;
legend(3, 3, "\bf column 1 and 2 of sample\_file");
endfig;
end