Info

此问题已关闭。 请重新打开它进行编辑或回答。

im new to matlab, does any one know , how to iterate 8 times ?

1 次查看(过去 30 天)
,h=[.482962913145,.836516303738,.224143868041,-1.2940952251];
convolve(h,h/2(in time));
convolve(h/2,h/4);.....up to 8 times

回答(1 个)

Jon
Jon 2019-9-16
You could do this with a for loop, something like this
h=[.482962913145,.836516303738,.224143868041,-1.2940952251];
numIter = 8; % number of iterations
% preallocate array to hold results, one row for each convolution
R = zeros(numIter,2*length(h)-1);
for k = 1:numIter
R(k,:) = conv(h/(2^(k-1)),h/(2^k));
end

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by