Relative different

25 visualizaciones (últimos 30 días)
iffah
iffah el 11 de Jun. de 2012
Hi there,
I am a MATLAB newbie, I'm trying to compute relative difference between two sets of data for example [x1,y1] and [x2,y2]
[x1,y1] and [x2,y2] are one column arrays with 106 rows.
I can't make up my mind on which function to use.
i have tried; fittting = 100 * (1-norm(capacitance1)/norm(capac))
percent_error=100*abs(capac-capacitance1)./capac;
per_error = abs(( (capac - capacitance1) ./ capacitance1 ) * 100) % This computes the percentage error of each element/each row.
errperf(capacitance1,capac,'pe') ;
Is there a MATLAB function that produces one value that identifies the relative difference/percentage error of two set of files? Help!
Thank you in advance Thank you in advance

Respuestas (1)

Nirmal
Nirmal el 12 de Jun. de 2012
Why dont you use norm ([x1,y1]-[x2,y2]).
if you want relative difference you can use norm([x1,y1]-[x2,y2])/norm([x1,y1])

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by