How to inter- and extrapolate within given values

8 visualizaciones (últimos 30 días)
Andreas Krämer
Andreas Krämer el 8 de Nov. de 2018
Respondida: Cris LaPierre el 17 de Dic. de 2018
Hi, i'm new to Matlab and i'm pretty much overwhelmed by its infinite possibilities. Until now i was at least able to plot my readings. Now i want to determine every Z for X=(0:0.001:0.5) and Y=(0:200), but i don't know how. I already used various functions like scatteredInterpolant, griddedInterpolant,...None of them worked properly for me. Maybe you guys can help me?
Grretings Andreas

Respuestas (1)

Cris LaPierre
Cris LaPierre el 17 de Dic. de 2018
Do you already have your X, Y and Z data? I'm assuming that is the black dots in your plot?
I think the best scenario is to use interp2.
Xnew=(0:0.001:0.5);
Ynew=(0:200);
Znew = interp2(X,Y,V,Xnew,Ynew);
See the example on the linked documentation page.

Categorías

Más información sobre Loops and Conditional Statements 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