bilinear interpolation of 2D matrix
Mostra commenti meno recenti
I am trying to apply Bilinear/bicubic interpolation on my data set which is in text files. These text files are in a folder and name output_00.text to output_23.text. Each text file consist on three columns. First is Latitude, second is longitude and third column is temperature value at this latitude and longitude(position over earth).
Temperature column contain -9999.000 as not a number or NaN values. This NaN value appear randomly in each file. Some times it appear over start, some times in middle of data, and some times at the end in the file. It is random in appearance.
I want to interpolate these NaN values with bilinear/ bicubic interpolation technique.
This code will read each text file and interpolate it with bilinear method and save it with method_00.text.
My text files has been attached
On google i found a tool for bilinear interpolation over a image or matrix. For the time shake this code can be modify to my requirement. But How? This code as been attached with this question. Link of this tool is here http://www.mathworks.com/matlabcentral/fileexchange/43533-bilinear-interpolation-of-an-image-or-matrix
Thanks always for this kind assistance
3 Commenti
@ Muhammad Usman Saleem: you have already asked this question:
And you have already been told that Because of your missing data you do not have gridded data, but scattered data points, so therefore you can only use a scattered interpolant. You cannot use bilinear/ bicubic interpolation.
Now you asked this question again, and the two answers below have told you exactly the same thing as I did: that you need to use a scattered interpolant. You got the same answer here too.
It seems that you misunderstand what bilinear/ bicubic interpolation can do: it cannot interpolate your data with missing values. It does not matter how many times you ask this question, the problem is your wrong understanding of those interpolation methods. If you spent some time trying to understand how bilinear/ bicubic interpolation work then you would understand why you cannot use them with your data. This would be a good place to start:
Muhammad Usman Saleem
il 9 Mar 2016
Stephen23
il 28 Mar 2016
The OP continues this topic here:
Risposta accettata
Più risposte (1)
Image Analyst
il 8 Mar 2016
1 voto
If your data are in a rectangular grid (i.e., an image), you can use imresize() (in the Image Processing Toolbox) to do bilinear interpolation, or a variety of other interpolations. If they're not in a grid, use scatteredInterpolant like Mike showed you.
5 Commenti
Muhammad Usman Saleem
il 8 Mar 2016
Image Analyst
il 8 Mar 2016
Take the x and y numbers and multiply by 10 to get pixels. Then assign the 3rd column as image values. Then use imresize().
Muhammad Usman Saleem
il 8 Mar 2016
Modificato: Muhammad Usman Saleem
il 8 Mar 2016
Image Analyst
il 8 Mar 2016
See attached.
Muhammad Usman Saleem
il 9 Mar 2016
Categorie
Scopri di più su Images in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

