Matlab合并多个.fig文件
来源:互联网 发布:磁卡刷卡器软件 编辑:程序博客网 时间:2024/05/23 14:30
Matlab提供了合并多个.fig文件的函数subplot(),通过调用subplot()函数可以将多个.fig合并为一个大的.fig文件。具体的工作原理是:subplot将画布划分为一个网格(grid),通过指定每个子fig文件的位置,将多个子fig合并为一个大的fig。该函数常用的方法如下:subplot(m, n, p),m表示网格的行数,n表示网格的列数,p表示子fig文件在网格中的位置。比如m = 3, n = 2, 不同p值如下图所示:
完整的代码如下所示:
h1 = openfig('1.fig','reuse');ax1 = gca;h2 = openfig('2.fig','reuse'); % open figureax2 = gca; % get handle to axes of figureh3 = openfig('3.fig','reuse');ax3 = gca;h4 = openfig('.4.fig','reuse');ax4 = gca;h5 = openfig('5.fig','reuse'); % open figureax5 = gca; % get handle to axes of figureh6 = openfig('6.fig','reuse'); % open figureax6 = gca; % get handle to axes of figureh7 = figure; %create new figures1 = subplot(2,3,1); %create and get handle to the subplot axess2 = subplot(2,3,2);s3 = subplot(2,3,3); %create and get handle to the subplot axess4 = subplot(2,3,4);s5 = subplot(2,3,5); %create and get handle to the subplot axess6 = subplot(2,3,6);fig1 = get(ax1,'children'); %get handle to all the children in the figurefig2 = get(ax2,'children');fig3 = get(ax3,'children'); %get handle to all the children in the figurefig4 = get(ax4,'children');fig5 = get(ax5,'children'); %get handle to all the children in the figurefig6 = get(ax6,'children');copyobj(fig1,s1); %copy children to new parent axes i.e. the subplot axescopyobj(fig2,s2);copyobj(fig3,s3); %copy children to new parent axes i.e. the subplot axescopyobj(fig4,s4);copyobj(fig5,s5); %copy children to new parent axes i.e. the subplot axescopyobj(fig6,s6);
0 0
- Matlab合并多个.fig文件
- matlab 使用一个figure窗口打开多个fig文件
- Matlab的fig文件
- matlab fig文件的操作
- MATLAB:从fig文件中读取数据
- MATLAB中从.fig文件导出数据
- MATLAB 从fig文件读取数据
- matlab与m文件,fig文件关联起来
- matlab中fig文件编辑后再次打开出现import wizard无法显示fig图像
- Matlab编程随笔:GUI的fig文件重命名
- .m、.fig等文件与MATLAB关联设置
- MATLAB之从fig文件中提取数据
- 怎样从MATLAB图形文件fig中提取数据
- 从Matlab .fig文件中读取数据,并重新绘图
- 从Matlab .fig文件中读取数据,并重新绘图
- 从Matlab .fig文件中读取数据,并重新绘图
- 合并多个Excel文件
- 合并多个word文件
- 【学习笔记】mysql 快速批量导入测试数据
- POJ 1836 Alignment 双向LIS+DP
- Problem M. Heaviside Functionz
- 手机安全卫士------手机防盗页面之自定义对话框&MD5加密
- 16个网站 --- 免费的人工智能电子书
- Matlab合并多个.fig文件
- Kth Largest Element in an Array
- 从Matlab .fig文件中读取数据,并重新绘图
- Multisim BLUE14.0使用介绍
- Tokyo Cabinet 的一个bug
- 走进Java(一)J2SE
- Leetcode NO.170 Two Sum III - Data structure design
- K - Perpetuum Mobile
- IP网络,光网络以及轨道交通的高速卸载随想