Need help to create MATLAB program for Nearest Neighbor Interpolation
Mostrar comentarios más antiguos
I need help to create MATLAB program to interpolate temperature data given as input.
Input data contains temperature for given latitude and longitude for particular year and month.
Input file is in excel format.
Format for interpolation input File:
1st column - year
2nd column - month
3rd column - latitude
4th column - longitude
5th column - value
Data is like below,
1969 1 17.5 72.5 25
1969 2 17.5 72.5 27
1969 3 17.5 72.5 29
.
.
.
2005 11 20.0 72.5 22
2005 12 20.0 7 2.5 24
Data is for range 1969/01 to 2005/12.
For co-ordinates 17.5N - 72.5E, 20.5N - 72.5E
Temperature data is in nonlinear format.
Need to interpolate using 0.25 x 0.25.
so, Now need to find temperature for 18.25N - 72.5E, 18.50N - 72.5E, 18.75N - 72.5E ...
Output file should contain temperature for above mentioned latitude and longitude and in excel format.
Can anybody help me on this issue.
1 comentario
Adam Danz
el 18 de Jul. de 2019
Use interp1() with 'nearest' method. (click link for description).
Respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!