"In het verleden behaalde resultaten bieden geen garanties voor de toekomst"

Current filter: »BaRef« (Click tag to remove it or click and/or to switch it.)

About this blog

These are the ramblings of Matthijs Kooijman, concerning the software he hacks on, hobbies he has and occasionally his personal life.

Most content on this site is licensed under the WTFPL, version 2 (details).

Sun Mon Tue Wed Thu Fri Sat
12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29          
Powered by Blosxom &Perl onion
(With plugins: config, extensionless, hide, tagging, Markdown, macros, breadcrumbs, calendar, directorybrowse, entries_index, feedback, flavourdir, include, interpolate_fancy, listplugins, menu, pagetype, preview, seemore, storynum, storytitle, writeback_recent, moreentries)
Valid XHTML 1.0 Strict & CSS
/ Blog / Uni / BaRef
Exporting figures from Matlab to LaTeX

I've been struggling away on exporting figures generated by Matlab for use in LaTeX. First attempts using the "Save as..." dialog looked promising and even listed SVG. Unfotunately, trying that resulted in the cryptic error "the svg device option is only supported for simulink systems", while I was trying to export a simulink generated figure... Oh well...

After some fiddling around with the eps option and the File->Export options... menu, which also allows exporting to eps but with some more options, I did a few exports. Unfortunately, doing these by hand every time (File->Export Options, Load the settings, apply to figure, Zoom to the correct scale, press Export, type filename, select EPS, click save, click ok, close window) was a little too much for my commandline-oriented brain.

Looking around in the help found me the print function, which one can use as follows:

print -f1 -deps Filename.eps

This, as expected, prints figure 1 to Filename.eps in the (black and white) eps format. If you want to print another figure, say figure 3, use -f3. If you want to have coloured eps output, use -depsc instead.

The only thing that still needs to be done by hand is zooming the figure, if appropriate, and closing the window (but IIRC a close all command at the end will close all figure windows).

Now, let's get to actually putting my exported .eps figures into my paper!

Related stories

0 comments -:- permalink -:- 00:08
Feeling good!

W00t, I've been having a nice night. Instead of my usual routine of not wanting to do things and delaying them, filling my time with "useless" coding or fiddling with my laptop or pc or stuff like that, I have spent all night doing "useful" stuff.

I had already spent an hour or two last week sorting out my cluttered email inbox (260+ messages) that contained emails that I was planning to reply to or that needed some action before they were fully handled. I had reduced the number of messages to 30 or so, that needed some action of some kind (and ten or so email discussions with Brenda that slowly died and still need sorting out). Mutt showing an empty mailbox

Today, I've looked at a bunch more mails, and instead of postponing them more, I actually did stuff and reduced my inbox to 12 messages. Besides that, I've done some work for my Bachelor Referaat, helped fixing our pandora registration, read the Inter-Actief financial semi-annual report and even found some time to do a little nerding in between.

In short, this was a very nice night, with no delaying, postponing and wasting time as usual. I'm even going to bed before 0200, which is not as bad as it could be (though still improvable, I'm pretty tired). But hey, you can't do everything at the same time :-)

0 comments -:- permalink -:- 01:45
Copyright by Matthijs Kooijman