Borrar filtros
Borrar filtros

Interpolation gives NAN output

1 visualización (últimos 30 días)
Espen Mikkelsen
Espen Mikkelsen el 23 de Mzo. de 2018
Respondida: Espen Mikkelsen el 24 de Mzo. de 2018
I have one array with height values and another with density.
Height = [386.5 446.1 526.6 621.5 660.6 711.4 734.9 792.8 810.2 817.9 893.7 1136.8 1317 1420.2 1426.2]
Density = [1.216 1.203 1.194 1.182 1.178 1.171 1.169 1.161 1.160 1.160 1.151 1.122 1.101 1.091 1.091]
I want to interpolate, so I can find the density of any heights. F.eks find the density at 500m. I have tried to do this:
Out = interp1(Height,Density,500);
But this only gives NAN numbers as output. I really cant understand, because I tried exactly the same earlier, and then it worked.

Respuesta aceptada

Espen Mikkelsen
Espen Mikkelsen el 24 de Mzo. de 2018
For some strange reason, it was working again when I restarted Matlab.

Más respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by