Code covered by the BSD License  

Highlights from
matlabfrag

matlabfrag

by

 

01 Sep 2008 (Updated )

A matlab figure to .eps and .tex file exporter, similar to LaPrint

ex10.m
%% Preamble -- not to appear in userguide
hfig = figure;
set(hfig,'units','centimeters','NumberTitle','off','Name','ex10');
pos = get(hfig,'position');
set(hfig,'position',[pos(1:2),6,5]);
%% Everything below appears in userguide
plot(rand(2));
axis([1 2 0 1]);
title(['2d matrix           ';'     weird alignment']);
xlabel({'cells';'are';'better!'});
text(2,0.5,'multiline in LaTeX','HorizontalAlignment',...
  'right','UserData',['matlabfrag:\begin{tabular}',...
  '{@{}r@{}}multiline\\in\\\LaTeX\end{tabular}']);
%% The following is excluded from userguide
matlabfrag('graphics/ex10');

Contact us