Filter löschen
Filter löschen

combinations, nchoosek or similar function nx2 array

1 Ansicht (letzte 30 Tage)
Justin
Justin am 12 Jan. 2012
I have data points (x and y) that I am using to fit a curve. I need to find out which 4 give me the best fit.
So I need a way to represent the 'x y' pair together or find a function that can give me combinations of each row.
At the moment I get every combinations of x values and then re-pair then with the y values after, very inefficient
  1 Kommentar
Matt Tearle
Matt Tearle am 12 Jan. 2012
I'm having a hard time interpreting the question. "... which 4 give me the best fit" -- which 4 what? (x,y) pairs? Are you fitting a curve to four points, so you want to take every 4-point combination from the n data points that you have? Can you provide a simple example? You have x and y in what form? n-element vectors? So something like
x y
0 0
1 1
2 4
3 9
4 16
5 25
6 36
So now what are you looking for from this?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Curve Fitting Toolbox 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