When dealing with the following code I get Matrix error must agree error.
E(m+1)=z/w;
The workspace though clearly indicates that the dimensions are the same for both z and w, 1001x1001.
l=[0:10000];
n=[0:1000];
g=1;
a=-0.5;
b=0.9;
for m=l
xl=cos(2*pi*m*n/10000)';
yl=ex22_1(xl,g,a,b);
%multiplication of matrix with its transpose resolves SUMn(yl[n])^2
z=yl*yl';
w=xl*xl';
E(m+1)=z/w;
end
printf(gcf,'-depsc2',['lti_crazy_function.eps']);
createFigure;
plot(1,10*log10(e),'.');
xlabel('Frequency (Hz)');
ylabel('Magnitude (dB)');
grid on;
any help would be much appreciated, thanks!