当前位置:网站首页>Smoothing data using convolution
Smoothing data using convolution
2022-06-26 15:05:00 【jk_ one hundred and one】
Convolution can be used to smooth two-dimensional data containing high-frequency components . Use peaks Function to create 2D data , And plot the data at each contour level .
Z = peaks(100);
levels = -7:1:10;
contour(Z,levels)As shown in the figure :

Insert random noise into the data and draw noisy contours .
Znoise = Z + rand(100) - 0.5;
contour(Znoise,levels)As shown in the figure :

MATLAB Medium conv2 The convolution() function computes the convolution of two-dimensional data using a specified kernel , The elements of this kernel define how to remove or enhance the features of the original data . The size of the core does not have to be the same as the input data . The small kernel is enough to smooth the data containing only a few frequency components . Larger cores can adjust the frequency response more accurately , To get a smoother output .
Define a 3×3 nucleus K And use conv2 Yes Znoise Smooth the noisy data in . Draw smoothed contour lines .conv2 Medium 'same' Option to make the output the same size as the input .
K = (1/9)*ones(3);
Zsmooth1 = conv2(Znoise,K,'same');
contour(Zsmooth1, levels)As shown in the figure :

use 5×5 Check the noisy data for smoothing , And draw new contours .
K = (1/25)*ones(5);
Zsmooth2 = conv2(Znoise,K,'same');
contour(Zsmooth2,levels)As shown in the figure :

边栏推荐
- RestCloud ETL抽取动态库表数据实践
- Optimizing for vectorization
- Authoritative announcement on the recruitment of teachers in Yan'an University in 2022
- Go变量的声明与赋值
- R language uses the aggregate function of epidisplay package to split numerical variables into different subsets based on factor variables, calculate the summary statistics of each subset, and use agg
- Unity C# 网络学习(八)——WWW
- Pytoch deep learning code skills
- Optimizing for vectorization
- Pod of kubernetes
- 使用宝塔面板部署flask环境
猜你喜欢

使用RestCloud ETL Shell组件实现定时调度DataX离线任务

这才是优美的文件系统挂载方式,亲测有效

获取两个dataframe的交并差集

Stream常用操作以及原理探索

TCP congestion control details | 1 summary
杜老师说网站更新图解

Mathematical modeling of war preparation 30 regression analysis 2

This is the graceful file system mounting method, which is effective through personal testing

teamviewer显示设备数量上限解决方法

Naacl2022: (code practice) good visual guidance promotes better feature extraction, multimodal named entity recognition (with source code download)
随机推荐
集群中命令的执行过程
The JVM outputs GC logs, causing the JVM to get stuck. I am stupid
Practical website recommendations worth collecting for College Students
Unity C# 网络学习(九)——WWWFrom
聊聊几位大厂清华同学的近况
MySQL master-slave replication and read-write separation
R language uses ggplot2 to visualize the results of Poisson regression model and count results under different parameter combinations
Authoritative announcement on the recruitment of teachers in Yan'an University in 2022
程序分析与优化 - 8 寄存器分配
信息学奥赛一本通 1405:质数的和与积 (思维题)
Redis transaction and watch instruction
Deployment of kubernetes' controller
Deploy the flask environment using the pagoda panel
The intersect function in the dplyr package of R language obtains the data lines that exist in both dataframes and the data lines that cross the two dataframes
打新债注册开户安全吗,有没有什么风险?
redis集群的重新分片与ASK命令
710. random numbers in the blacklist
RestCloud ETL抽取动态库表数据实践
vue中缓存页面 keepAlive使用
The engine "node" is inconsistent with this module