How to fit a number of curves

2 Ansichten (letzte 30 Tage)
Isa Isa
Isa Isa am 27 Dez. 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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 27 Dez. 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 Kommentare
Walter Roberson
Walter Roberson am 27 Dez. 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 am 27 Dez. 2012
Thanks. It works

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by