声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 8854|回复: 11

[混合编程] 请问如何将matlab生成的图形(figure)插入到word文件中?

[复制链接]
发表于 2007-1-4 09:42 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
如何用脚本文件来实现?
谢谢!
回复
分享到:

使用道具 举报

发表于 2007-1-4 09:49 | 显示全部楼层
自动插入到word?
 楼主| 发表于 2007-1-4 10:10 | 显示全部楼层

回复 #2 TNC 的帖子


想在notebook中实现
但由于要求的是用脚本文件
所以不知道用什么方法
发表于 2007-1-4 11:45 | 显示全部楼层
手动插入就可以了,为啥要这么费事呢
发表于 2007-1-4 12:45 | 显示全部楼层
使用matlab里的命令把图自动保存成一个个emf文件吧,然后在word里用vba或者宏实现批量快速插入并且设置图片大小....
自己尝试来吧,路子是可行的,不过我没有尝试过。
 楼主| 发表于 2007-1-4 15:56 | 显示全部楼层

回复 #4 superliu 的帖子

这个问题只是目前项目的一个小问题
具体就是把在matlab中生成的数据和图像保存到一个word文件中
手动插入的话,就不太方便了
发表于 2007-1-4 16:40 | 显示全部楼层
方法是这样的:figure的菜单edit里面有copy figure option里面第一项选择metafile,以后可以直接用edit里的copy figure,copy到word里面
 楼主| 发表于 2007-1-4 17:29 | 显示全部楼层
原帖由 心灯 于 2007-1-4 12:45 发表
使用matlab里的命令把图自动保存成一个个emf文件吧,然后在word里用vba或者宏实现批量快速插入并且设置图片大小....
自己尝试来吧,路子是可行的,不过我没有尝试过。


那么在matlab中如何调用vba程序或者宏命令呢?
 楼主| 发表于 2007-1-4 17:36 | 显示全部楼层
原帖由 vib 于 2007-1-4 16:40 发表
方法是这样的:figure的菜单edit里面有copy figure option里面第一项选择metafile,以后可以直接用edit里的copy figure,copy到word里面

这个方法是手动的
如何用代码来实现呢?
发表于 2007-1-4 18:09 | 显示全部楼层
原帖由 cwhu 于 2007-1-4 17:29 发表


那么在matlab中如何调用vba程序或者宏命令呢?

matlab中不能用,而是在word中用。
我说的过程也不是完全自动的,至少需要一次手动,呵呵
matlab是产生一大堆emf图形文件,然后再word里用vba插入图形文件。

要不你看看M-notebook能否解决你的问题,在 matlab中运行word。

Desktop Tools and Development Environment   

Notebook for Publishing to Word


Notebook allows you to access the numeric computation and visualization software of MATLAB from within the word processing environment, Microsoft Word. Using Notebook, you can create a document, called an M-book, that contains text, MATLAB commands, and the output from MATLAB commands.

You can think of an M-book as a record of an interactive MATLAB session annotated with text, or as a document embedded with live MATLAB commands and output. Notebook is useful for creating electronic or printed records of MATLAB sessions, class notes, textbooks or technical reports. This section introduces basic Notebook capabilities: Creating or Opening an M-Book Entering MATLAB Commands in an M-Book Protecting the Integrity of Your Workspace in M-Books Ensuring Data Consistency in M-Books

Note    Notebook is available only on Windows systems that have Microsoft Word installed. For supported versions of Word, see Configuring Notebook.


  Modifying Published Output Via Preferences Creating or Opening an M-Book  

© 1994-2006 The MathWorks, Inc. • Terms of Use • Patents •

[ 本帖最后由 心灯 于 2007-1-4 18:43 编辑 ]
发表于 2009-2-26 22:29 | 显示全部楼层
如果我希望复制到word中的figure 中的数据可以改动,我该如何做??
发表于 2009-2-27 08:09 | 显示全部楼层

回复 11楼 gameplayer 的帖子

旧版无此功能, 新版或许有, 抱歉有点懒得找!
敢问LZ为何不在Matlab处理好, 再复制到word?
什麽的工程需求要如此连动处理?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-11 15:17 , Processed in 0.180774 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表