combinations, nchoosek or similar function nx2 array

1 visualización (últimos 30 días)
Justin
Justin el 12 de En. de 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 comentario
Matt Tearle
Matt Tearle el 12 de En. de 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?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Curve Fitting Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by