Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have a question concerning 'result difference'
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...