index assignment in matrix.

T(8x2000) matrix, in(8x6500) matrix.
I have the following for applying delays in matrix 'T' into a signal in matrix 'in'(each row of 'in' represents a signal.That is, 'in' has 8 signals, each of 6500 samples):
for d=1:numel(T)
out(d,:)=function(in(n,:),T(d));
end
Everytime 'd' jumps to next column in matrix 'T', then 'n' should reset to 1 and run till 8 along the rows of matrix 'in'. This should continue for all values of 'd' from 1 to 16000.
How can I do it? please help

Respuestas (1)

Jan
Jan el 23 de Feb. de 2012

0 votos

The question is not clear to me. Perhaps you want:
for d = 1:numel(T)
out(d, :) = function(in(rem(d, 8) + 1, :), T(d));
end
[EDITED] A typo: "rem(n,8)" -> "rem(d,8)"

3 comentarios

zozo
zozo el 23 de Feb. de 2012
I want to know what should come in place of 'n' in the above piece of code.
I want the following:
when d=1,2,3...8
out(1,2,3..8,:)=function(in(1,2,3...8,:),T(1,2,3,...8));
but when d=9,10,11,...16;
out(9,10,11...16,:)=function(in(1,2,3...8,:),T(9,10,11...16));
and
d=17,18,19,...24;
out(17,18,19...24,:)=function(in(1,2,3...8,:),T(17,18,19...24));
.
.
.
.
.
.
and so on till d=15993,15994,15995...16000.
zozo
zozo el 23 de Feb. de 2012
please help.
Jan
Jan el 25 de Feb. de 2012
Dear zozo: I had a typo in the code. I think, you should have been able to fix this by your own.

Iniciar sesión para comentar.

Categorías

Preguntada:

el 23 de Feb. de 2012

Editada:

el 25 de Oct. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by