Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Missing pulses in my design,how to delay a sequence in matlab editor

Status
Not open for further replies.

prashanthi999

Member level 1
Joined
Nov 19, 2014
Messages
39
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
287
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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top