Effacer les filtres
Effacer les filtres

How to interpolate values

1 vue (au cours des 30 derniers jours)
chaos4u2
chaos4u2 le 7 Mar 2013
Hello. I have the question about how would you interpolate some values. For example, I have:
x y z
1 4 7
3 6 9
I want a point between (1,4) and (3,6) with the mean value of z.
Thank you in advanced!!
  4 commentaires
Matt Kindig
Matt Kindig le 7 Mar 2013
Do you just mean that you want the mean of the x, y, and z coordinates? If so, your middle point would simply be
mid = mean([x, y, z], 1);
Or are you asking something else?
chaos4u2
chaos4u2 le 7 Mar 2013
Thank your for answering.
Not exactly. I have a file .dat of coordinates x,y,z. About 2 million data or even more.
What I want is to reduce all, for example at 10.000. But I don't know how to do it. I thought to do an interpolation, but I'm realising that's not a good idea.

Connectez-vous pour commenter.

Réponse acceptée

Sean de Wolski
Sean de Wolski le 7 Mar 2013
There aren't enough points to perform a 2d scattered interpolation which requires a Delaunay Triangulation under the hood. Instead, just use interp1 twice:
interp1([1 4],[7 9],2.5)
or acquire more data (recommended).
  1 commentaire
chaos4u2
chaos4u2 le 7 Mar 2013
Thank you!!!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Interpolation 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