prashanthi999
Member level 1
Code:
input = [0;-0.342;0.642;-0.866;0.984;-0.984;0.866;-0.642;0.342;0;-0.342;0.642;-0.866;0.984;-0.984;0.866];
D_R_1_stage1(8)=0;
hello every one ,i have a pulse missing problem in my code, im using circshift operation for delaying the sequence
,i have 16 input sequences, in the first loop im only storing my first 8 elements , in the second loop im performing a two mathematical equations from the incoming sequence with the already stored elements sequentionlly, i should call both my values under the same name "zr_stage1" coming out from the for loop, im getting my 8 values of the zr_stage1 exactly correct from the second loop, but from the other half of the 8 elements , im getting only 7 elements, im missing an element kindly help me.
Code:
for m=1:16
if(m==0)
zr1_stage1 = input(m);
D_R_1_stage1(1) = zr1_stage1;
D_R_1_stage1 = circshift(D_R_1_stage1,[0,-1]);
zr_stage1 = D_R_1_stage1(1)
else
zr1_stage1 = D_R_1_stage1(1) - input_real_stage1(m);
zr_stage1 = D_R_1_stage1(1) + input_real_stage1(m)
D_R_1_stage1(1) = zr1_stage1;
D_R_1_stage1 = circshift(D_R_1_stage1,[0,-1]);
end
end