五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Matlab卷積函數(shù)——conv2

2021-10-15 10:24 作者:有AI野心的電工和碼農(nóng)  | 我要投稿

功能:?是二維卷積運算函數(shù)(與convmtx2相似)。

如果a和b是兩個離散變量n1和n2的函數(shù),則關于a和b的二維卷積運算數(shù)學公式如下:

用法:

C = conv2(A,B)

C = conv2(hcol,hrow,A)

C = conv2(…,'shape')

C = conv2(A,B)計算數(shù)組A和B的卷積。如果一個數(shù)組描述了一個二維FIR濾波器,則另一個數(shù)組被二維濾波。當A的大小為[ma,na], B的大小為[mb,nb]時,C的大小為[ma+mb-1,mb+nb-1]。‘shape’?見下表

例子:

s = [1 2 1; 0 0 0; -1 -2 -1];

A = zeros(10);

A(3:7,3:7) = ones(5);

H = conv2(A,s);

mesh(H)

Matlab的幫助:

conv2

2-D convolution

Syntax

C = conv2(A,B)

C = conv2(hcol,hrow,A)

C = conv2(…,'shape')

Description

C = conv2(A,B) computes the two-dimensional convolution of matrices A and B. If one of these matrices describes a two-dimensional finite impulse response (FIR) filter, the other matrix is filtered in two dimensions.

The size of C in each dimension is equal to the sum of the corresponding dimensions of the input matrices, minus one. That is, if the size of A is [ma,na] and the size of B is [mb,nb], then the size of C is [ma+mb-1,na+nb-1].

The indices of the center element of B are defined as floor(([mb nb]+1)/2).

C = conv2(hcol,hrow,A) convolves A first with the vector hcol along the rows and then with the vector hrow along the columns. If hcol is a column vector and hrow is a row vector, this case is the same as C = conv2(hcol*hrow,A).

C = conv2(…,'shape') returns a subsection of the two-dimensional convolution, as specified by the shape parameter:

fullReturns the full two-dimensional convolution (default).sameReturns the central part of the convolution of the same size as A.validReturns only those parts of the convolution that are computed without the zero-padded edges. Using this option, C has size [ma-mb+1,na-nb+1] when all(size(A) >= size(B)). Otherwise conv2 returns [].Note?If any of A, B, hcol, and hrow are empty, then C is an empty matrix [].

Algorithm

conv2 uses a straightforward formal implementation of the two-dimensional convolution equation in spatial form. If a and b are functions of two discrete variables, n1 and n2, then the formula for the two-dimensional convolution of a and b is

In practice however, conv2 computes the convolution for finite intervals.

Note that matrix indices in MATLAB always start at 1 rather than 0. Therefore, matrix elements A(1,1), B(1,1), and C(1,1) correspond to mathematical quantities?a?(0,0),?b?(0,0), and?c?(0,0).

Examples

For the 'same' case, conv2 returns the central part of the convolution. If there are an odd number of rows or columns, the "center" leaves one more at the beginning than the end.

This example first computes the convolution of A using the default ('full') shape, then computes the convolution using the 'same' shape. Note that the array returned using 'same' corresponds to the underlined elements of the array returned using the default shape.



Matlab卷積函數(shù)——conv2的評論 (共 條)

分享到微博請遵守國家法律
枣庄市| 屯门区| 邵阳县| 甘泉县| 驻马店市| 琼中| 玛纳斯县| 湖口县| 潢川县| 富源县| 高平市| 镇沅| 高唐县| 江孜县| 本溪市| 博野县| 双柏县| 泽库县| 怀集县| 巴中市| 渝北区| 仁怀市| 蓬溪县| 长顺县| 石阡县| 布拖县| 香格里拉县| 阿拉善左旗| 温宿县| 阳朔县| 双牌县| 定南县| 西藏| 台中县| 平邑县| 天长市| 梁河县| 吉安县| 桐梓县| 上思县| 松江区|