I have these random Gaussian variables A and B to represent voltages. I also have resistances in series with the voltages, RA and RB, respectively. I want to take voltage measurements in between RA and RB, and I want to measure the current from A to B. I have implemented,
I = (A-B)/(RA+RB);
U = I*RA-A;
Let's say RA has a high value, RH, but I want to use process of elimination to find out. I have implemented,
A_calc = U+I*RL; %guess the low value first
Now I want to check if the calculation matches.
if A_calc==A
disp('RA=RL');
else
disp('RA=RH');
end
Now the issue is, A_calc is never equal to A. There are always deviations, no matter what I set the resistance value to.
What could be the error? Is it the resolution lost? I thought MATLAB was 16 bits of resolution?