当前位置:网站首页>使用卷积对数据进行平滑处理
使用卷积对数据进行平滑处理
2022-06-26 14:48:00 【jk_101】
可以使用卷积对包含高频分量的二维数据进行平滑处理。使用 peaks 函数创建二维数据,并在各个等高线层级对数据绘图。
Z = peaks(100);
levels = -7:1:10;
contour(Z,levels)如图所示:

向数据中插入随机噪声并绘制含噪等高线。
Znoise = Z + rand(100) - 0.5;
contour(Znoise,levels)如图所示:

MATLAB 中的 conv2 函数使用指定的核求二维数据的卷积,该核的元素定义如何去除或增强原始数据的特征。核的大小不必与输入数据相同。小核足以对仅包含少数频率分量的数据进行平滑处理。较大的核可以更精确地对频率响应进行调整,从而得到更平滑的输出。
定义一个 3×3 核 K 并使用 conv2 对 Znoise 中的含噪数据进行平滑处理。绘制经过平滑处理的等高线。conv2 中的 'same' 选项使输出的大小与输入相同。
K = (1/9)*ones(3);
Zsmooth1 = conv2(Znoise,K,'same');
contour(Zsmooth1, levels)如图所示:

用 5×5 核对含噪数据进行平滑处理,并绘制新等高线。
K = (1/25)*ones(5);
Zsmooth2 = conv2(Znoise,K,'same');
contour(Zsmooth2,levels)如图所示:

边栏推荐
- 15 BS object Node name Node name String get nested node content
- Principle of TCP reset attack
- Pytoch deep learning code skills
- R language dplyr package summary_ The at function calculates the mean and median of multiple data columns (specified by vectors) in the dataframe data, and specifies na RM parameter configuration dele
- 文献1
- Authoritative announcement on the recruitment of teachers in Yan'an University in 2022
- 【雲原生】 ”人人皆可“ 編程的無代碼 iVX 編輯器
- 房东拿租金去还房贷是天经地义的嘛
- R语言使用ggplot2可视化泊松回归模型(Poisson Regression)的结果、可视化不同参量组合下的计数结果
- [cloud native] codeless IVX editor programmable by "everyone"
猜你喜欢

The heavyweight white paper was released. Huawei continues to lead the new model of smart park construction in the future

Deploy the flask environment using the pagoda panel

15 BS object Node name Node name String get nested node content

Notes on writing questions in C language -- table tennis competition

Electron

View触摸分析

聊聊 RPA 方向的规划:简单有价值的事情长期坚持做

TS常用数据类型总结

710. 黑名单中的随机数

程序分析与优化 - 8 寄存器分配
随机推荐
【 Native cloud】 Éditeur ivx Programmable par tout le monde
R language uses ggplot2 to visualize the results of Poisson regression model and count results under different parameter combinations
使用 Abp.Zero 搭建第三方登录模块(一):原理篇
Combat readiness mathematical modeling 31 data interpolation and curve fitting 3
Unity UnityWebRequest 下载封装
feil_uVission4左侧工目录消失
[solo π] ADB connects multiple mobile phones
Excerpt from three body
北京银行x华为:网络智能运维夯实数字化转型服务底座
Informatics Olympiad all in one 1400: count the number of words (string matching)
TCP 复位攻击原理
redis集群的重新分片与ASK命令
The engine "node" is inconsistent with this module
集群中命令的执行过程
Is it safe for flush to register and open an account? Is there any risk?
Mark: unity3d cannot select resources in the inspector, that is, project locking
A remove the underline from the label
Halcon C # sets the form font and adaptively displays pictures
Numpy基本使用
券商经理给的开户链接安全吗?找谁可以开户啊?