1d interpolation from multiple text files
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question
- nearest neighbor interpolation
- bilinear interpolation
- First column is latitude
- Second column is longitude
- Third column consist on air temperature corresponding to that latitude and longitude.
- Each interpolation technique interpolate temperature(3rd column) in text file and save this interpolated text file with inter_NNH(means this text file has been interpolated with nearest neighbor) and inter_BILIN(means this text file has been interpolated with bi-linear interpolations).
- After that, there will be 72 text files remains in my folder. (24 for uninterpreted and 48 of interpolated.)
6 Comments
- Now my mind is that, code check each value of A0 and interpolate only NaN values with my method of interpolation(like, nearestest neighbor, spline etc.). Values other than NaN remains uninterpreted
- After interpolating these NaN values, my code pass this interpolated column of temperature to its P0 text file( means makes another text file with name int_methodName.text in which NaN or missing values are interpolated?
- What t(nanx) is doing in the last line of my code? What kind of interpolation it is doing?
- This code running fine. But it not interpolating margin NaN values in my text file( mostly are of bottom ones)?
Accepted Answer
2 votes
29 Comments
- what the loops are iterating over
- then you will know how many times the inner loop runs.
- add a counter variable, and check its value after the code finishes (a universal solution).
- multiply the number of times the outer and inner loops run. This is easy because you can read the code (hint: look for size(out,...), and note that this is the number of rows and columns of the 3D data array).
- Understand the algorithm: each latitude and longitude is independently interpolated (as you requested), therefore it must iterate for each latitude and longitude...
- which is incidentally the number of lines of data in the data files.
- Use a loop.
- Write a function.
More Answers (0)
Categories
Find more on Interpolation of 2-D Selections in 3-D Grids in Help Center and File Exchange
Products
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)