# How to fit a number of curves

2 Ansichten (letzte 30 Tage)
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
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Akzeptierte Antwort

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 Kommentare5 ältere Kommentare anzeigen5 ältere Kommentare ausblenden
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 am 27 Dez. 2012
Thanks. It works

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by