フィルターのクリア

Sequentially add figures to a word document using Report Generator

4 ビュー (過去 30 日間)
Benjamin Green
Benjamin Green 2015 年 5 月 26 日
回答済み: Benjamin Green 2015 年 5 月 26 日
I have a script which produces a series of figures which I would like to be placed into a word document. Each figure will be on its own page. Further I would like to be able to add a title below the figure within word which is indexed based on the number of figures in the document, and is formated to a particular style such that when the word document is linked to a master document the figure titles are picked up for creating a figure list.
Matlab r2014b
Report Generator
Office 2010
Win7

採用された回答

Benjamin Green
Benjamin Green 2015 年 5 月 26 日
Thank you, that got me started in the right direction.

その他の回答 (1 件)

Sebastian Castro
Sebastian Castro 2015 年 5 月 26 日
What I've done in my work is save the figure as an image and add it to my report. Furthermore, you can pick the title text from the axes as follows:
docPart = DocumentPart(docType);
myAxes = gca;
append(docPart, Text(myAxes.Title.String));
myFig = gcf;
print(myFig,'-djpeg','test1');
test1img = Image('test1.jpg');
append(docPart, test1img);
- Sebastian

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by