Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
pavan Kumar babu
pavan Kumar babu le 16 Sep 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
,h=[.482962913145,.836516303738,.224143868041,-1.2940952251];
convolve(h,h/2(in time));
convolve(h/2,h/4);.....up to 8 times
  1 commentaire
Jon
Jon le 17 Sep 2019
Did this answer your question?

Réponses (1)

Jon
Jon le 16 Sep 2019
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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by