Saving a MATLAB graphic or Simulink model to Word
You may have noticed some recent changes in the format of this blog. Here’s what to expect on a regular basis – two topics
per week.
Suresh Joel's submission SAVE2WORD is Brett's selection for the new Pick of the Week.
I really like the idea that the File Exchange is more than the just a repository of functions. It can be thought of, in fact,
as a medium for collaboration in code development. Several years ago, Mark Brown shared with the MATLAB community a very popular file (SAVEPPT) that allows you to save MATLAB figures or Simulink models to a PowerPoint document. Mark's file was selected early in this blog's history as a Pick of the Week. That file subsequently inspired two submissions, including Suresh's SAVE2WORD.
With SAVE2WORD, it's now trivially easy to embed an existing figure or model in a Microsoft Word document.
- On Tuesdays Doug will provide MATLAB tutorials.
- On Fridays guest bloggers Jiro, Brett and Bob will highlight File Exchange submissions.
L = 40*membrane(1,25); surf(L,'EdgeColor','interp') set(gca,'visible','off') daspect([1,1,0.9]) save2word('test.doc');I like Suresh's function because I can easily see it becoming a part of my workflow when I'm writing a paper in Word. Like the file that inspired it, SAVE2WORD does something that a lot of users might find useful, but that is not necessarily easy to write. (The file uses ActiveX objects to access and modify the specified Word document. Note that this implies that SAVE2WORD will only work on Windows machines. Anyone care to write a non-ActiveX version?) One thing I would have liked to see (enhancement request?) is support for writing multiple figures or models with a single call to SAVE2WORD. Of course, one could easily batch process open figures or models, but it would be nice if the function did that for us. I'll have more to say in future blogs about files that inspired, or were inspired by, other File Exchange submissions. In the meantime, feel free to share your thoughts on the most useful File Exchange file that cites inspiration from another submission.
- カテゴリ:
- Picks
コメント
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。