Can anyone help with cross correlation error in Simulink?

Discussion in 'Wireless & RF Design' started by jamil1988, Nov 23, 2015.

  1. jamil1988

    Thread Starter New Member

    Nov 19, 2015
    11
    0
    I am sorry if I say any thing silly. I have a vector x below and trying to implement correlation with itself (lets say x2) in Simulink, but getting error. I am getting all zeros in result of my output vector. Kindly can some one please help me out in it. Thanks in advance.

    ts=1*10^-9;
    t=0*10^-9:ts:150*10^-9;
    fc=1*10^6;
    y=yi*0;
    yi=154*10^-9:ts:2000*10^-9;
    x=[xi y];
    x2=x;
    z=xcorr(x2,x);
     
Loading...