myconvmtx.m

来自「基于Matlab的地震数据处理显示和测井数据显示于处理的小程序」· M 代码 · 共 35 行

M
35
字号
function matrix=myconvmtx(w,n)% Function creates convolution matrix of the form%          | w1 w2 w3  0  0  0|%          | 0  w1 w2 w3  0  0|%          | 0  0  w1 w2 w3  0|%          | 0  0  0  w1 w2 w3|% if "w" is a column vector and its transposed if it is a row vector.% Emulation of "convmtx" of Signal Processing Toolbox% Written by: E. R., October 21, 2005% Last updated:%%       matrix=myconvmtx(w,n)% INPUT% w     vector (wavelet)% n     number of rows of matrix (in the example above n = 4)% OUTPUT% matrix  convolution matrixm=length(w);mc=m+(n-1);matrix=zeros(n,mc);index=1:n+1:n*n;for ii=0:m-1;   matrix(index)=w(ii+1);   index=index+n;endntr=size(w,2);if ntr == 1   matrix=matrix .';end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?