Matlab缩放曲线局部窗口
参考链接:
1、matlab画一个局部放大的图中图_奔流聚海-CSDN博客_matlab局部放大图第一种:magnify是个动态放大镜,固化后可以用tools>edit plot移动小图,能选取多个局部图,这个方法不错用法:打开figure图,输入magnify,左键动态选取查看,ctrl+左键固化,也可右键固化,‘’缩放方法范围,‘+’和‘-’缩放放大比例。 Ever wish MATLAB had a magnifying glass so you could loohttps://blog.csdn.net/wangh0802/article/details/702371182、Matlab绘图基本——局部放大图_u011049256的专栏-CSDN博客_matlab 局部放大之前写论文的时候,出图用到了局部放大图,当时网上搜到了一个比较好用的函数:magnify.m文件。源自MathWorks社区,下载解压,画完图后载入该文件即可。1、鼠标停放在想放大的区域,按住右键,此时鼠标点击处出现类似放大镜的方框,可以移动选择要放大的区域,通过'<'和'>'缩小或扩大方框范围,通过'-'和'+'键减小或增加局部缩放比例,调整到自己想到的区域和缩放大小,松开右键即...
https://blog.csdn.net/u011049256/article/details/103907756
示例代码主要绘制了Matlab对气象参数的局部放大图,如下:
clear
clc
% close all
load T430Met.mat%% 滤波算法[Xfilter1, Pfilter1] = kalmanFor1D( t4300010(:,1),0.2, 10);% kalman滤波,内部噪声参数已经调好
[smoothZTD1] = smooth( t4300010(:,1),100 , 'sgolay',6);% SG滤波1000个点作为弧段用6阶多项式拟合[Xfilter2, Pfilter2] = kalmanFor1D( t4300010(:,2),0.2, 10);% kalman滤波,内部噪声参数已经调好
[smoothZTD2] = smooth( t4300010(:,2),100 , 'sgolay',6);% SG滤波1000个点作为弧段用6阶多项式拟合[Xfilter3, Pfilter3] = kalmanFor1D( t4300010(:,3),0.2, 10);% kalman滤波,内部噪声参数已经调好
[smoothZTD3] = smooth( t4300010(:,3),100 , 'sgolay',6);% SG滤波1000个点作为弧段用6阶多项式拟合%% 滤波曲线
h_fig = figure('name', 'plot','unit','centimeters', 'position',[1 1 12.9 10]);
subplot(3,1,1)
hold on
plot(t4300010(:,1), 'b-.','LineWidth',1)
plot(smoothZTD1, 'g','LineWidth',1)
plot(Xfilter1, 'r','LineWidth',1)
ylabel('Pressure (hPa)')
set(gca,'fontsize',10, 'fontname', 'Arial')
% 生成子图
zoomfigure = axes('Position',[0.30,0.86,0.2,0.07]); % 生成子图
hold on
set(zoomfigure,'color','none');
zoomIndex = 60:100;
plot(zoomIndex, t4300010(zoomIndex,1), 'b-.','LineWidth',1)
plot(zoomIndex, smoothZTD1(zoomIndex), 'g','LineWidth',1)
plot(zoomIndex, Xfilter1(zoomIndex), 'r','LineWidth',1)
set(zoomfigure,'ytick',[]); %因为image函数的原因,需要清除坐标轴
legend('Meteorological', 'Savitzky-Golay', 'Kalman','Orientation','horizontal')
legend('boxoff')
set(gca,'fontsize',10, 'fontname', 'Arial')%%
subplot(3,1,2)
hold on
plot(t4300010(:,2), 'b-.','LineWidth',1)
plot(smoothZTD2, 'g','LineWidth',1)
plot(Xfilter2, 'r','LineWidth',1)
ylabel('Temperature (\circC)')
set(gca,'fontsize',10, 'fontname', 'Arial')
% 生成子图
zoomfigure = axes('Position',[0.27,0.48,0.2,0.07]); % 生成子图
hold on
set(zoomfigure,'color','none');
zoomIndex = 520:530;
plot(zoomIndex, t4300010(zoomIndex,2), 'b-.','LineWidth',1)
plot(zoomIndex, smoothZTD2(zoomIndex), 'g','LineWidth',1)
plot(zoomIndex, Xfilter2(zoomIndex), 'r','LineWidth',1)
set(zoomfigure,'ytick',[]); %因为image函数的原因,需要清除坐标轴
set(gca,'fontsize',10, 'fontname', 'Arial')subplot(3,1,3)
hold on
plot(t4300010(:,3), 'b-.','LineWidth',1)
plot(smoothZTD3, 'g','LineWidth',1)
plot(Xfilter3, 'r','LineWidth',1)
ylabel('Humidity (%)')
set(gca,'fontsize',10, 'fontname', 'Arial')
xlabel('Epoch (60s)')
% 生成子图
zoomfigure = axes('Position',[0.21,0.24,0.2,0.07]); % 生成子图
hold on
set(zoomfigure,'color','none');
zoomIndex = 520:530;
plot(zoomIndex, t4300010(zoomIndex,3), 'b-.','LineWidth',1)
plot(zoomIndex, smoothZTD3(zoomIndex), 'g','LineWidth',1)
plot(zoomIndex, Xfilter3(zoomIndex), 'r','LineWidth',1)
set(zoomfigure,'ytick',[]); %因为image函数的原因,需要清除坐标轴
set(gca,'fontsize',10, 'fontname', 'Arial')
代码链接参考:matlabMet · master · 肖恭伟 / Matlab示例代码 · GitCode
Matlab缩放曲线局部窗口相关推荐
- matlab球坐标曲线,matlab绘制曲线subplotsphere球面坐标绘制饼图
实验报告 实验名称:实验一MATLAB初步 一.实验目的与要求: 1. 了解MATLAB的特点: 2. 熟悉MATLAB环境和命令窗口 3.熟悉常用命令的使用方法,尤其是帮助命令: 4.掌握MATLA ...
- MATLAB基础操作--命令窗口
MATLAB基础操作–命令窗口 常用的赋值运算符-'='对变量进行赋值 x=9-5 x = 4 x-8=9 x-8=9 ↑ 错误: '=' 运算符的使用不正确.要为变量赋值,请使用 '='.要比较值是 ...
- matlab 剪毛刺,MATLAB消除曲线毛刺Outlier Detection and Removal [hampel]
MATLAB消除曲线毛刺Outlier Detection and Removal [hampel] function [YY, I, Y0, LB, UB, ADX, NO]=hampel(X, Y ...
- matlab曲线已知y求x,已知X、Y用MATLAB绘制曲线
已知X.Y坐标数值,如何用MATLAB绘制曲线 2008-12-03 10:46:19| 分类:默认分类|字号订阅 横轴为X坐标纵轴为Y坐标 最佳答案 plot(x,y,'s') s为可选参数 具体可 ...
- MATLAB 三维曲线
MATLAB 三维曲线 plot3函数 plot3(x,y,z) eg:绘制一条空间折线 x=[0.2,1.8,2.5]; y=[1.3,2.8,1.1]; z=[0.4,1.2,1.6]; plot ...
- matlab极坐标画椭圆,Matlab极坐标曲线怎么绘制
摘要 腾兴网为您分享:Matlab极坐标曲线怎么绘制,桌面时钟,易订货,微拍,玩客云等软件知识,以及天天气象,华图教育app,金立手机软件商店,h5编程软件,充点卷,绘声绘色软件,实达bp690kii ...
- MATLAB如何在同一窗口中显示两幅图片
该例子来源于matlab官网 This is an example of how to display multiple images in a subplot in MATLAB®. 有关同一图像窗 ...
- matlab plot 曲线类型
#matlab plot 曲线类型
- Matlab 绘图 曲线颜色自定义
Matlab 绘图 曲线颜色自定义 同时组合图内间距小 确定绘制曲线的RGB颜色 根据RGB颜色将其除以255归一化到0-1,plot中选择属性'color'为RGB值即可. 示例如下 rn = 2; ...
最新文章
- 关于MVC/P 的简单介绍
- 【 C 】队列的链式存储实现
- python 描述_python描述符
- android工程下不能运行java main程序的解决办法
- EPLAN P2.7安装教程
- Java毕设项目航空订票系统火车票订购系统(2021最新)
- OCR文字识别算法与搭建流程
- 超级无敌diao炸天的手写堆
- Opencv多版本共存问题
- leetcode 第1题【两数之和】C语言
- 0x5085170C (ucrtbased.dll)处(位于 Project1.exe 中)引发的异常: 0xC0000005: 读取位置 0x0000001A 时发生访问冲突。
- 区块链通证经济——资产流动性的变革
- C语言查询ask码的函数,ask码(字符转成ascii码)
- cv2.imread
- 医学图像配准实现代码(matlab篇)
- 华为鸿蒙系统应用开发工具介绍 DevEco Studio
- R语言计量经济学:工具变量法(两阶段最小二乘法2SLS)线性模型分析人均食品消费时间序列数据和回归诊断
- Codeforces Round #655 (Div. 2) C
- 基于python和MATLAB的遗传算法优化函数最小值
- layui的layer的用法