I'm College student, and now studying Matlab.
I saw a verification problem. problem is following...
Let x(n) be a random sequence uniformly distributed between [0,1] over 0> x = rand(1,11); n=0:10;
>> k = 0:500; w = (pi/500)*k;
>> X = x * (exp(-j*pi/500)).^(n'*k); % DTFT of x
>> y = x; m = n+2;
>> Y = y * (exp(-j*pi/500)).^(m'*k); % DTFT of y
>> % verification
>> Y_check = (exp(-j*2).^w).*X;
>> error = max(abs(Y-Y_check)); % difference
My question is that,
1) What is the reason that error is NOT zero?
error is very very marginal value, but I think, that error must be zero in digital calculation(like MATLAB)
Could you tell me the reason?
2) and, if there is way that error be zero, Could you teach me about that?
Before that EXAMPLE, I think that all digital calculation has same result.
for example, 1 + 2 + 3 = 6
Anytime, and by any computer, 1 + 2 + 3 = 6.
I really really want to know about that.
Please someone answer my question...
0 · ·