Can you help me in compare whit matlab ?

1 view (last 30 days)
moner
moner on 8 Oct 2014
Commented: Orion on 8 Oct 2014
hello,
I' need a function to compare files & Give a ratio of compare difference
Example : - a=5 , b=5.5 then a~=b but compare difference is approx... 60% .
please help .....
  1 Comment
Orion
Orion on 8 Oct 2014
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);

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!