comp.soft-sys.matlab - The MathWorks calculation and visualization package.
Hi everyone, hope I am not hitting to much of an evergreen here... I want to do 4-D piecewise linear interpolation and extrapolation. interpn works great for values inside the range but reports NaNs outside. Of course, it is conceptually not difficult to program a multidimensional piecewise linear interpolation oneself. So my concern is: if I write my own code it's likely to be slower than the optimized Mathworks code. But I need to do the approximation so often that speed is crucial. Does anyone see a simple way to "fix" interpn for my purposes? I am not necessarily looking for a solution from somebody else but for a good strategy: try to write it all on my own or just try to deal with the NaNs in the output I get from interpn? Thanks in advance for suggestions, jasper
I have a scattered 3-D polar grid data (X,Y,Z converted to Cartesian, data from Lidar) and 'W' at every location on the Grid. I need to interpolate and extrapolate these wind speeds (W) on a +45m terrain following surface (complex). How can I use F = TriScatteredInterp(X,Y,Z,W) to get the function (F) and then use the terrain co-ods to get the wind speeds at those locations. The actual size of X = 50(range gates) x 300 (beams) x 10(scans), the +45m surface is somewhere in between these data points. The size I Input into Triscatteredinterp, since it requires vector form of data X =15000x10, Y = 15000x10, Z = 15000x10, W= 15000x10. When I use TriScatteredInterp it gives me an error saying "Input data point locations have invalid dimension." If I Input just one column it gives me a surface which I can use for interpolation, why does it not work for more than one column of data? Is there any other method which can do both interpolation and some degree of extrapolation too?? Similar Issues with Griddata3 and interp3. Not sure how to efficiently use these commands for my purpose, grid problems!! Eventually I will have to do this for 10 days worth of data (the above example is just 10 mins). Please explain.
Hi all, I have a problem on the extrapolation, i have surface in 'height' data, in the circular form,this is freeform surface height. The problem is i want to extrapolate the circular form into rectangular form, hence i need to fill in the blank region (because from circular to rectangular you will have blank region at 4 corners) with new height. Until now i can't find the good extrarpolation method to find the new height data to fill in the blank region, m that can give me continuos surface. Please help me Thanks
I need to extrapolate a pont using function interp1. I discovered that I must use the parameter 'extrap' in order to do this. >> t = 1900:10:1990; p = [75.995 91.972 105.711 123.203 131.669... 150.697 179.323 203.212 226.505 249.633]; >> x = 1900:1:2000; y = interp1(t,p,x,'spline'); % interpolate and plot plot(t,p,'o',x,y) My question is how ca I interpolate a certain point using interp1 function extrap function. In documentation I cannot see any example. Can you help me pls?