It's not clear, do you want to compare files or variables ?
And in your example, the difference between a and b is 10 % which you can consider as a relative error calculated by
d = abs((a-b)/a);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!