Dear All,

I am sorry if I say any thing silly.Please forgive me.

I am trying to implement below code in Matlab HDL Coder but facing problems, getting error given below.

x1=[1 2 3 4 5 6 7 8 9];

x2=[3 4 5 6 7 8 9 2 1];

n=length(x1);

xc=zeros(2*n-1,1);

for i=1:2*n-1

if(i>n)

j1=1;

k1=2*n-i;

j2=i-n+1;

k2=n;

else

j1=n-i+1;

k1=n;

j2=1;

k2=i;

end

xc(i)=sum(conj(x1(j1:k1)).*x2(j2:k2));

end

xc=flipud(xc);

Can some please help me how is that possible.

Cannot connect to model 'prc4'; please try Update Diagram (Ctrl-D).

Error due to multiple causes.

Data 'y' (#130) is inferred as a variable size matrix, while its specified type is something else.

Even I am unable to understand the error.Please some one have a look into it.Thanks in advance.

Similar questions and discussions