I keep getting an error that says "Matrix dimensions must agree." while running this code.Please suggest me some options to fix this error.
%chirp generation (430-470KHZ)
fs=450e4;pulsewidth =0.0004;i=1/fs;t =0:i:pulsewidth;f0=430e3;f1=470e3;x=chirp(t,f0,pulsewidth,f1);plot(x)figure(1)title('Chirp Signal');ylabel('Amplitude')xlabel('Time');% generating white gaussian noise
l=1401;mu=0;sigma=.0001;noise=sigma*randn(1,l)+mu;N=length(x);intf = int16(zeros(1,N)); % 'f'-integer type
% flipping
for d = 1:1:Nintf(d) =x(N-d+1);endF=length(intf);% generating noisy signal
y=[zeros(1,200),x,zeros(1,200)]+noise; n=length(y);for j=1:1:ny(j)=y(j)*1000;endY=int16(y);N=length(Y);subplot(4,1,2)plot(y) figure(2)% creating convoluted product array
r=zeros(1,1601);R=int16(r);M=length(R);%convlution
for k=1:1:N-F s=0; for q=1:1:F s=s+(Y(k+q)*intf(q)); end R(k)=int16(s); end subplot(4,1,3) plot(R)
Best Answer