当前位置:网站首页>matlab讀取多張fig圖然後合並為一張圖(子圖的形式)
matlab讀取多張fig圖然後合並為一張圖(子圖的形式)
2022-04-23 03:54:00 【subtitle_】
引言
多次做實驗得到了一些實驗的圖像,matlab導出保存為了fig格式,想讀取多張fig圖然後合成為一張大圖(子圖的形式),查了一些資料,記錄一些自己的思考和體會。
1.代碼
for i=1:10
%打開的fig文件酌情修改路徑
hf(i)=open(['.\fig\sin-x1-test_',num2str(i),'.fig']);%打開fig
fig(i)=get(hf(i), 'CurrentAxes');%獲取繪制的圖像
end
%新建一個圖窗
figure
for i=1:10
%看要繪制多少行多少列酌情改變
subplot(2,5,i);%第i個子圖
axChildren = get(fig(i),'Children');%獲取繪制的圖像
copyobj(axChildren, gca);%複制到當前圖窗裏
close(hf(i));%關掉已經複制的圖像
%下面是對圖片進行設置,請酌情修改
title(['S曲線第',num2str(i),'次測試']);%繪制子圖標題
xlabel('Angle(\circ)');%繪制子圖x標簽
ylabel('Center WaveLength Change(nm)');%繪制子圖y標簽
yaxis([-0.05,0.2])%繪制子圖y的範圍
xticks([0 20 40 60 80 100]);%繪制子圖刻度
end
2.最終效果如圖
版权声明
本文为[subtitle_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230353257558.html
边栏推荐
- Vs studio modifies C language scanf and other errors
- 【NeurIPS 2019】Self-Supervised Deep Learning on Point Clouds by Reconstructing Space
- The art of concurrent programming (5): the use of reentrantlock
- Cmake qmake simple knowledge
- OpenCV----YOLACT实例分割模型推理
- What is software acceptance testing? What are the benefits of acceptance testing conducted by third-party software testing institutions?
- Picture synthesis video
- 伦敦银最新价格走势图与买卖点
- Raspberry pie 3B logs into the wired end of Ruijie campus network through mentohust, creates WiFi (open hotspot) for other devices, and realizes self startup at the same time
- ROS series (IV): ROS communication mechanism series (6): parameter server operation
猜你喜欢
Wechat applet canvas draws a simple asymptotic color of the dashboard
[AI vision · quick review of robot papers today, issue 30] Thu, 14 APR 2022
Design and implementation of redis (5): master-slave replication strategy and optimization
Photoshop installation under win10
As a code farmer, what kind of experience is it that a girlfriend can code better than herself?
Xiaomi, which has set the highest sales record of domestic mobile phones in overseas markets, paid renewed attention to the domestic market
Use of rotary selector wheelpicker
Variables, constants, operators
Summary of knowledge map (3)
Machine translation baseline
随机推荐
[mathematical modeling] my mathematical memory
Now is the best time to empower industrial visual inspection with AI
Install PaddlePaddle on ARM
Laboratory safety examination
The art of concurrent programming (3): an in-depth understanding of the principle of synchronized
What if you encounter symbols you don't know in mathematical formulas
[latex] differences in the way scores are written
ROS series (IV): ROS communication mechanism series (2): Service Communication
知乎有问题,谁来解答?
Instructions for fastmock
变量、常量、运算符
2021-09-03 crawler template (only static pages are supported)
The whole process of connecting the newly created unbutu system virtual machine with xshell and xftp
Design and implementation of redis (5): master-slave replication strategy and optimization
php导出Excel表格
UDP协议与TCP协议
[AI vision · quick review of robot papers today, issue 30] Thu, 14 APR 2022
ROS series (IV): ROS communication mechanism series (1): topic communication
Oracle JDK vs OpenJDK
ROS series (II): ROS quick experience, taking HelloWorld program as an example