vipinlal
Full Member level 6

Code:
realW = 2.0*cos(2.0*pi*20/2001);
imagW = sin(2.0*pi*20/2001);
y = 0;
d1 = 0.0;
d2 = 0.0;
N=2001;
for n= 1:N
{
y = x(n) + realW*d1 - d2;
d2 = d1;
d1 = y;
}
end
resultr = 0.5*realW*d1 - d2;
resulti = imagW*d1;
I am getting the following error on the below code,please help..
??? y = x
|
Error: The expression to the left of the equals sign is not a valid target for
an assignment.