https://www.mathworks.com/help/matlab/ref/conv.html?s_tid=gn_loc_drop

conv

Convolution and polynomial multiplication

Syntax

Description

example

w = conv(u,v) returns the convolution of vectors u and v. If u and v are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials.

example

w = conv(u,v,shape) returns a subsection of the convolution, as specified by shape. For example, conv(u,v,'same') returns only the central part of the convolution, the same size as u, and conv(u,v,'valid') returns only the part of the convolution computed without the zero-padded edges.

 

Examples

collapse all

Polynomial Multiplication via Convolution

Create vectors u and v containing the coefficients of the polynomials and .

u = [1 0 1];
v = [2 7];

Use convolution to multiply the polynomials.

w = conv(u,v)
w =

     2     7     2     7

w contains the polynomial coefficients for .

Vector Convolution

Create two vectors and convolve them.

u = [1 1 1];
v = [1 1 0 0 0 1 1];
w = conv(u,v)
w =

     1     2     2     1     0     1     2     2     1

The length of w is length(u)+length(v)-1, which in this example is 9.

 

Central Part of Convolution

Create two vectors. Find the central part of the convolution of u and v that is the same size as u.

u = [-1 2 3 -2 0 1 2];
v = [2 4 -1 1];
w = conv(u,v,'same')
w =

    15     5    -9     7     6     7    -1

w has a length of 7. The full convolution would be of length length(u)+length(v)-1, which in this example would be 10.

 

Input Arguments

u,v — Input vectors
vectors

Input vectors, specified as either row or column vectors. The
output vector is the same orientation as the first input argument, u.
The vectors u and v can be different
lengths or data types.

Data Types: double | single
Complex Number Support: Yes

shape — Subsection of convolution
'full' (default) | 'same' | 'valid'

Subsection of the convolution, specified as 'full', 'same',
or 'valid'.

'full'

Full convolution (default).

'same'

Central part of the convolution of the same size as u.

'valid'

Only those parts of the convolution that are computed
without the zero-padded edges. Using this option, length(w) is max(length(u)-length(v)+1,0),
except when length(v) is zero. If length(v)
= 0
, then length(w) = length(u).

Convolution

@向量的卷积 重叠面积

The convolution of two vectors, u and v, represents the area of overlap under the points as v slides across u. Algebraically, convolution is the same operation as multiplying polynomials whose coefficients are the elements of u and v.

Let m = length(u) and n = length(v) . Then w is the vector of length m+n-1 whose kth element is

The sum is over all the values of j that lead to legal subscripts for u(j) and v(k-j+1), specifically j = max(1,k+1-n):1:min(k,m). When m = n, this gives

w(1) = u(1)*v(1)
w(2) = u(1)*v(2)+u(2)*v(1)
w(3) = u(1)*v(3)+u(2)*v(2)+u(3)*v(1)
...
w(n) = u(1)*v(n)+u(2)*v(n-1)+ ... +u(n)*v(1)
...
w(2*n-1) = u(n)*v(n)

https://www.zhihu.com/question/22298352?rf=21686447


卷积就是带权的积分

从概率论的角度来理解吧,举例为X Y 两组连续型随机变量,那么令Z=X+Y ,当X Y两组变量独立时,就能推导出卷积公式了,fz=fx*fy的意义就是在于两组变量叠加出来的概率密度,也就是算两信号X Y混叠起来的时候的响应
:
他的女儿是做环保的,有一次她接到一个项目,评估一个地区工厂化学药剂的污染(工厂会排放化学物质,化学物质又会挥发散去),然后建模狮告诉她药剂的残余量是个卷积。她不懂就去问她爸爸,prof就给她解释了。假设t时刻工厂化学药剂的排放量是f(t) mg,被排放的药物在排放后Δt时刻的残留比率是g(Δt) mg/mg;那么在u时刻,对于t时刻排放出来的药物,它们对应的Δt=u-t,于是u时刻化学药剂的总残余量就是∫f(t)g(u-t)dt,这就是卷积了。

Convolution and polynomial multiplication的更多相关文章

  1. Algorithm: 多项式乘法 Polynomial Multiplication: 快速傅里叶变换 FFT / 快速数论变换 NTT

    Intro: 本篇博客将会从朴素乘法讲起,经过分治乘法,到达FFT和NTT 旨在能够让读者(也让自己)充分理解其思想 模板题入口:洛谷 P3803 [模板]多项式乘法(FFT) 朴素乘法 约定:两个多 ...

  2. matlab中卷积convolution与filter用法

    转自:https://blog.csdn.net/dkcgx/article/details/46652021 转自:https://blog.csdn.net/Reborn_Lee/article/ ...

  3. 图像处理之基础---卷积及其快速算法的C++实现

    头文件: /* * Copyright (c) 2008-2011 Zhang Ming (M. Zhang), zmjerry@163.com * * This program is free so ...

  4. 二维码详解(QR Code)

    作者:王子旭链接:https://zhuanlan.zhihu.com/p/21463650来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 2016.7.5 更新:长文 ...

  5. CKKS Part3: CKKS的加密和解密

    本篇文章翻译于CKKS EXPLAINED, PART 3: ENCRYPTION AND DECRYPTION,主要介绍CKKS方案的加密和解密. 介绍 在上一篇 CKKS Part2: CKKS的 ...

  6. FZU 2215 Simple Polynomial Problem(简单多项式问题)

    Description 题目描述 You are given an polynomial of x consisting of only addition marks, multiplication ...

  7. Understanding Convolution in Deep Learning

    Understanding Convolution in Deep Learning Convolution is probably the most important concept in dee ...

  8. polynomial time

    https://en.wikipedia.org/wiki/Time_complexity#Polynomial_time An algorithm is said to be of polynomi ...

  9. POJ1060 Modular multiplication of polynomials解题报告 (2011-12-09 20:27:53)

    Modular multiplication of polynomials Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3 ...

随机推荐

  1. mysql -- 模糊查询的四种方法

    摘录自:http://www.jb51.net/article/48315.htm 1 %:表示任意0个或多个字符.可匹配任意类型和长度的字符,有些情况下若是中文,请使用两个百分号(%%)表示. 比如 ...

  2. php中ignore_user_abort函数的用法(定时)

    PHP中的ignore_user_abort函数是当用户关掉终端后脚本不停止仍然在执行,可以用它来实现计划任务与持续进程,下面会通过实例讨论ignore_user_abort()函数的作用与用法. i ...

  3. unity3d中的DontDestroyOnLoad来回切换出现多个实例问题

    在用Unity3D开发游戏中,我们会经常创建多个场景,但是在场景过度的时候,通常场景中的对象会被删除.所以Unity3D给了我们一个不删除前一个 场景中的某一个对象或者脚本的API,那就是“DontD ...

  4. Windows下配置Apache+PHP跑Wordpress拾遗

    首先,我很少这么做,因为一旦有跑WAMP的需求,我就直接下一个wamp的安装包就可以了,市面上数不胜数,我一直用的是EasyPHP,不是说它有多好,而是很多年前第一次用后没什么问题,就一直用下来了.这 ...

  5. chrome浏览器开发者工具使用教程[转]

    转自:http://www.cr173.com/html/16930_1.html 更多资源:https://developers.google.com/chrome-developer-tools/ ...

  6. 远程数据库备份到本地出现“Access denied for user 'root'@localhost(using password: YES)”的问题

    由于另外一个人在用远程的server做测试,导致我访问这个远程机器的mysql提示“too many connections”的问题,于是想到干脆把数据库当下来做测试好了,结果用heidiSQLs进行 ...

  7. 如何快捷地使用ChemBio 3D检查结构信息

    ChemBio 3D是一款三维分子结构演示软件,能够轻松快捷地进行化学结构的制作和立体旋转.ChemBio 3D Ultra 14作为ChemBio 3D的最新版本可以更加快捷地制作化学结构.本教程将 ...

  8. OpenCV学习:Mat结构中的数据共享机制

    使用Mat类,内存管理变得简单,不再像使用IplImage那样需要自己申请和释放内存. Mat是一个类,由两个数据部分组成:矩阵头(包含矩阵尺寸,存储方法,存储地址等信息)和一个指向存储所有像素值的矩 ...

  9. js判断用户关闭页面或浏览器

    <html><head><meta http-equiv="Content-Type" content="text/html; charse ...

  10. [extjs] ExtJs4.2 Form 表单提交

    基本代码: <script> Ext.onReady(function(){ Ext.create('Ext.form.Panel', { title: '登录', bodyPadding ...