Freigeben über


Matlab to OneNote - Thanks to Stephen Lawrence

I just got an email from Stephen Lawrence who shared with me a Matlab app/script which will publish to OneNote.  For example say you have the following in Matalb:

fprintf('Hello World\n');
figure;
plot(magic(10));

And then you wanted to publish it to OneNote, you can with just this one command:

OneNotePublish('test.m');

Steve explains it all here:

I took your Send file to OneNote powertoy code and adapted it for Matlab. I have attached my code below so that you can get an idea of how it works.

I had to switch from creating Matlab XML to Matlab HTML...the result works well. All I had to do to publish my file in OneNote was type:

   OneNotePublish('test.m');

in the command window.I got the resulting page:

image

You can download the source for this by downloading it here: Matlab2OneNote.  Nice work Steve!  Thanks a bunch for telling me about it!

Comments

  • Anonymous
    June 20, 2007
    PingBack from http://www.onenotepowertoys.com/2007/06/21/matlab-to-onenote/

  • Anonymous
    June 21, 2007
    The comment has been removed

  • Anonymous
    July 06, 2007
     I was thinking about something like this for some of our in-house apps.  The extra feature that would be really nice would be to have a link back to the original document so I can scan through many file outputs in OneNote and then open the one I am interested in.  I was looking at the API and it seemed hard to add a link to a file on the outputted page.

  • Anonymous
    July 11, 2007
    Ran across this OneNote PowerToy on Daniel Escapa's OneNote Blog that allows you to output Matlab to

  • Anonymous
    July 11, 2007
    Ran across this OneNote PowerToy on Daniel Escapa's OneNote Blog that allows you to output Matlab to

  • Anonymous
    July 11, 2007
    Ran across this OneNote PowerToy on Daniel Escapa's OneNote Blog that allows you to output Matlab

  • Anonymous
    July 11, 2007
    Ran across this OneNote PowerToy on Daniel Escapa's OneNote Blog that allows you to output Matlab

  • Anonymous
    February 10, 2008
    i am trying to solve a simulation in VRP coding in MATLAB.Pls help , i am facing some major problems.

  • Anonymous
    October 17, 2008
    I am trying to plot a scatter graph and a bar graph on the same axis.  I want the scatter graph to use the left hand side y axis (which I have done) however I want the bar graph to use the left hand side y axis.  does anyone know how to do this?

  • Anonymous
    April 29, 2009
    It is nice! But published images look like they are plain bitmaps - they pixelize after beeing zoomed in. If I copy a Matlab image using Matlab's edit menu and paste it into OneNote the copy can bee zoomed and it looks very nice - like a vector graphics. Is it possible to make OneNotePublish to publish images as such a nice (vector/metafile?) image? Regards, Jiri

  • Anonymous
    January 07, 2011
    I really really want to use this script, but it gives me an error from matlab: ??? Error: Object returned error code: 0x80042006 Error in ==> OneNotePublish at 25 unfiledID = onApp.OpenHierarchy(unfiledSectionPath, '', 0); % cftNone = 0, cftNotebook = 1, cftFolder = 2, cftSection = 3 This is using Matlab R2010a and One Note 2010. Any suggestions for how to fix this?

  • Anonymous
    May 12, 2015
    Hi, I found a 74% OFF coupon to Learn Matlab Udemy course Couponcode: MATLAB25 www.udemy.com/learn-matlab