How to fit a number of curves

2 visualizzazioni (ultimi 30 giorni)
Isa Isa
Isa Isa il 27 Dic 2012
Hi,
I have a number of curves that have the same trend and relatively close to one another on the same plot and wish to fit these curves so that they can be represented by a single curve. Please advise me on how to do it.
Thanks
Isa

Risposta accettata

Walter Roberson
Walter Roberson il 27 Dic 2012
You could fit the mean (or the median) of the curves. But if you wish to give more importance to larger deviations from the mean, then you would use different techniques.
What kind of curve are you planning to fit?
  7 Commenti
Walter Roberson
Walter Roberson il 27 Dic 2012
allX = [x1,x2,x3,x4,x5,x6];
allY = [y1,y2,y3,y4,y5,y6];
A = [log(allX(:)), ones(length(allX),1)];
B = log(allY(:));
C = A \ B;
sortX = sort(allX);
plot(sortX, exp(C(2)) * sortX .^ C(1))
Isa Isa
Isa Isa il 27 Dic 2012
Thanks. It works

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by