combinations, nchoosek or similar function nx2 array

1 vue (au cours des 30 derniers jours)
Justin
Justin le 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 commentaire
Matt Tearle
Matt Tearle le 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?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by