A Few MATLAB Utility Functions:
- fp2wordo.m Invoke this function to caption all existing figures in MATLAB and insert them into a Word document with a specified number of figures per row. (Before using this function, ensure that ‘figstyle’ and ‘capstyle’ are styles already present in your Word document.) (To minimize the work of updating fields, it’s best that figure captions do not include chapter titles.)
- fcombineMOHU.m Select content in Word document ‘doc1’ with the mouse, and navigate to the desired insertion point in ‘doc2’. Invoke this function to copy the selected content into another report.
- wop2ppt.m (See ‘wop2ppt’ example for usage) Select content within a Word document, and invoke this function to arrange all images within the selected content into a PowerPoint presentation with a specified number of images per slide. (Refer to the ‘exampleforwop2ppt.m’ in the ‘wop2ppt’ example for how to call this function.)
- batchvisio.m (See ‘wovis.m’ for usage) For a document:
1)Batch edit Visio files, such as replacing keywords, by calling ‘batchvisio.m’.
2)Batch save Visio files by calling ‘batchvisio.m’.
3)Batch save pixel images (if the original image has a transparent background, it will not be saved with a white background; the background remains transparent).
5.fdgword.m (See ‘examfdgword.m’ for usage) For the entire document, align phrases like “其中” and “式中” to the top of the page.
几个matlab小函数
1.fp2wordo.m
调用这个函数-把matlab已经画出的所有figure指定题注,每行多少个插入到word里。(使用该函数前,注意figstyle,capstyle,一定是word文档中已有的样式)(为了减少更新域工作,图片题注最好不带章标题)
2.fcombineMOHU.m
在word中doc1鼠标选定内容,doc2鼠标点到要粘贴的位置,调用这个函数-把选定内容复制到另一报告里。
3.wop2ppt.m(调用见wop2ppt示例)
在word里选定部分内容,调用这个函数-将选定部分的所有图片在PPT里以每页几个排布出来(调用见wop2ppt示例的exampleforwop2ppt.m)
4.batchvisio.m(调用见wovis.m)
对一个文档
1)批量编辑visio,如替换关键词,将调用batchvisio.m
2)批量保存visio,将调用batchvisio.m
3)批量保存像素图片(如果原图片中背景是透明的,另存为时也不会加白色,背景仍是空的)
5.fdgword.m(调用见examfdgword.m)
对全文文档“其中”、”式中“等顶格
Cite As
Mark (2025). matlab tool for office (https://uk.mathworks.com/matlabcentral/fileexchange/172510-matlab-tool-for-office), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2024b
Compatible with R2015b and later releases
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
