Griddata 'v4' interpolation

I'm using an equation node so that I can use the griddata('v4') method for interpolating an (x,y,z) Data set.  For the most part, it seems like the interpolation is generating the right points.  But in some cases I'm running into some unexplained results.
I'll plot a series of points (x,y,z), with the max z value equal to -60.  Generally, when I plot (x,y) points with a z value of -60 (depending on the values of the neighboring points) I would expect to get a value of a little above -60 or a little below.  Most of the time these results are produced.  Other times, in the same data set, I have points that have z values of -110, -115, and -90, that end up creating a new, interpolated z value of -70.  This jump in the z value makes me question whether or not I'm using the proper interpolation technique.
The data that I'm graphing should look like a hill, with a single peak, as the altitude decreases with distance.  Smaller hills may appear as the distance from the center peak grows, but there should never be a peak near the value of the maximum peak.
I've attached a vi that shows 3 views of the data:
1. Plot - location of points with z values attached
2. 2d Mesh - 2d view of data after mesh/interpolation
3. 3d Graph - 3d view of data after mesh/interpolation
Some of the reasons for this sort of error may be due to the clustered nature of some of the lower z values.  My only reasoning for these erroneous peaks is that these lower values are some how stacking together, which end up creating poor results.  Does anyone have any ideas about how to get around this?
Attachments:
meshing, peaks.vi ‏4909 KB

Yeah I've looked online at matlab interpolation function here:
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/griddata.html&http://www.google.com/search?hl=en&q=matlab+griddata&btnG=Search
This looked okay to me.  I think I've determined that the number of samples and the spacing between the samples really does matter in the final output.  I am plotting then interpolating between nearly 200 points.  There are a few other posts online that I'm going to continue to look at to see if there are any differences between the interpolations styles.
I'm still having a hard time understanding the two resultant peaks that are generated after I interpolate over the entire data set (both of which are nearly equal in value).  To try and isolate the problem, I interpolated over part of the data set, the portion which I believe to generate the 2nd erroneous peak.  But when I did this, I saw a peak intensity which is 20 values lower than what was generated with all the data (this is what I expect).  So, I really don't see anything which might indicate there is anything wrong with the interpolation.  I'll post again, if I figure out what's going on.  Thanks for the response.

Similar Messages

  • 2d interpolation index order?

    Hi,
    this is not really a problem but i am properly confused by the purpose or the way labview works.  as i am doing the 2d interpolation for some image analysis, i converted the loaded image into a 2D array.  it took me a while to figure out the index correspondence between pixel coord and the (row, col) in the array.  it seems that the pixel value at (x, y) coord is put in the (col, row) of the matrix, so that when the 2D array is displayed in an intensity map, it is rotated 90 degrees wrt to the image.
    i can see the point of this "column first" index convention, because the matrix index is (col, row) in the image coord:
    (col0, row0)  (col1, row0), ...
    (col0, row1)  (col1, row1), ...
    nonetheless, common labview vi for array manipulation such as "index array" and "replace array subset" still work in such a way that the first index is row and then the column follows, same as how people locate matrix elements.  if not dealing with image, there is no confusion, untill --
    as i am doing the 2D interpolation, which does not have to be involved in image processing at all, the (xi, yi) pairs actually mean (col, row), when the help doc says xi is the first "independent variable", even though clearly if i want to read an element, i need to put row as the first index.  the help doc describes the(xi, yi) pair as "The VI looks up each value of xi, yi in
    X, Y...".  nowhere in the help doc indicates whether "first independent variable" means row index or column index. 
    up to this point, i have no idea why labview treats interp2D so differently from ordinary array vis.  IMO, the fact that one has to either transpose 2D array or to swap xi/yi index is extremely confusing and inconvenient.
    -E

    AG -
    Thanks for the VI. I do understand that the X and Y data need to be monotonically increasing and formatted as a mesh as you showed me in your VI. However, the problem I run into is when generating the Z matrix. I have scattered points that have been measured in different X and Y locations, and do not represent a regular 2D grid. Sometimes the data is measured in a few points around a circle, for instance, but I want to interpolate over a rectangle containing the circle.
    So, my Z data looks like this (see attached image):
    Which I can write as a 1-D array into the griddata function in matlab
    Attachments:
    zdata.JPG ‏28 KB

  • LV imath and gmath for 2D interpolation

    It seems as though there are two separate math developments in LV - the traditional "gmath" which is available through the palette menus, and the Matlab-derived "imath" which is exposed through the MathScript windows.  However, under the hood, this is still all written in G.  My query is that, although there is different (but overlapping) functionality available - will these two sets be integrated?
    I'm coming at this from looking at 2D interpolation.  Gmath functions only allow for interpolation of regularly spaced data, however through MathScript one can call the "griddata" function to interpolate irregular data - it does a Delauney triangulation, then interpolation, all exactly as Matlab would.  Diving into this reveals a VI vi.lib\imath\engines\lvmath\MC_Math_99.llb\Interpolate 2D for Scattered Data.vi which can be called directly in the way the gmath routines are (although there is no documentation, help or examples for this routine).
    There seems no reason for this function not to be available on the Math\Interpolation menu.
    So the question is - down the track, will a single set of Math functions be provided, accessible both directly or through MathScript? Or is the plan to keep them separate, and require the user to hunt through for useful functions?
    Message Edited by GregS on 05-28-2007 06:13 PM
    Attachments:
    2Dinterp.gif ‏3 KB

    Hi GregS,
    That seems to be an excellent suggestion. I would highly recommend you to file a suggestion at the Product Suggestion Center. You can navigate to this website by visiting Contact NI and clicking on feedback under Product Feedback. I would like to thank you in advance for your observation and feedback!
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Animated gif interpolation

    i want to export some animated gifs using quicktime player 7. but i dont want antialiasing / interpolation, - i rather want every pixel to be translated to e.g 100 pixels directly. so if the gif is 16 * 16 px, i get a .mov at 160 * 160 that look 'superpixelated'. can i do that with qt pro, or fcp or whatever?

    sorry for letting you think i want to achieve something crazy impossible. i just dont want the interpolation when going up in size.

  • Interpolation Package for Flex 3 based web page

    Hi All,
    Is there any Flex 3 API to interpolate the attribute data.
    I am developing a web page in that I need to interpolate the attribute data which is in the database and afterwords i have to display the interpolated image in the webpage.
    Plaese let me know..
    Thanks in advance..

    Hi
    Welcome to Apple Discussions
    Usually this type of crash report indicates the web coding used by the site is not compatible with Safari. Try using Firefox.
    Specific to this site, you can go to Safari Preferences>Security and uncheck the Javascript box before opening the URL. I suspect Safari won't crash.
    If you want, post the URL and I'll try it from here using Safari 3.

  • Concept of circular interpolation

    Hi,
    I'm interested in knowing the concepts / formulas / algorithms invovled in circular interpolation. Suppose I give the position where the I have to reach in a 2-D plane and the radius of the circular arc, then the controller feeds the X-axis drive with a sequence of position commands which follow a mathematical function and at the same time, the controller also feeds another set of position commands to Y-axis, which follow another mathematical function. Also the velocities of X-axis and Y-axis follow two seperate mathematical functions. The combination of all these mathematical functions executed simultanously results in an interpolation. This is my understanding of circular interpolation. I am interested in knowing these four functions for X position, Y-position, X-Velocity and Y-Velocity. Kindly help me out with this. Kindly let me know if my understanding of the concept is wrong and what may be right approach to this problem. I do not want to use the arc vi provided by NI as it takes 'start angle', 'travel angle' and 'radius', but I want to feed 'start position', 'final position' and 'radius' to achieve th arc.
    Regards,
    Giridhar Rajan
    Automation Engineer
    Cruiser Controls
    Mumbai, India

    Hello,
    The National Instruments supported method for generating a circular arc move is to use Load Circular Arc.flx.  However, it is perfectly possible to generate your own interpolation algorithm.  I would suggest that you take a look at the following link for a starting point in generating move data:
    Command Generation
    http://www.control.com/control_com/Papers/CommandGeneration_html
    This is a third-party interpolation algorithm, but it may be helpful in developing your own method.
    Regards,
    Scott R.
    Applications Engineer
    National Instruments

  • Mathscript griddata function is very slow in Labview 8.6

    I'm using the griddata function in Mathscript as a direct replacement of a Matlab function we were using in the past.
    I discovered a bug with griddata which was fixed in Labview 8.5. The funciton executed very well in that version.
    I've upgraded the code to LV8.6, and now when executing griddata on the same data set in either 'linear' or 'cubic' mode, the function is MUCH slower than when using 'v4' or 'nearest'. All four methods had the same execution time in LV8.5.1
    I have searched many topics covering issues with griddata and 'cubic', but I'm pretty sure this is a new bug. 
    I've attached a VI containing my data set. Running this VI in 8.5.1 and using 'linear' mode is much faster than in 8.6.
    I'll be going back to Matlab, since the rest of the code has already been upgraded to 8.6 and this makes regression it unusable for my purposes.
    Any ideas?
    Thanks.
    Attachments:
    no_Matlab_griddata_example.vi ‏94 KB

    I should correct one detail in my message. The girddata bug was originally fixed for 8.5.1, not 8.5, per the following CAR: 41OHD4VQ
    The attached VI should be run in 8.5.1 and then in 8.6 ('linear' method) to see the performance decrease.

  • How do I remove "interpol virus" from my iPad?

    Hi in my ipad Air ios 8.0.0  when i visit some pages like "www.98ia.com"  and  "www.p30world.com" it redirect to a page named "police attention" or something like that and then a page appears full of "interpol logo" and then wants me to pay 100 pound and then my iPad turns off Automatically!!! i Test all of  solutions like 1.turn javascrypt off 2.block cookies and pop-up 3.restart my iPad 4..... what shoul i do?!! somebody help me please, please,
    if i should install an antyvirus tell me which antyvirus is suitable?!
    formerly i excused because of my bad "English"

    Helpful Links Regarding Malware Problems
    If you are having an immediate problem with ads popping up see The Safe Mac » Adware Removal Guide and AdwareMedic.
    Open Safari, select Preferences from the Safari menu. Click on Extensions icon in the toolbar. Disable all Extensions. If this stops your problem, then re-enable them one by one until the problem returns. Now remove that extension as it is causing the problem.
    The following comes from user stevejobsfan0123. I have made minor changes to adapt to this presentation.
    Fix Some Browser Pop-ups That Take Over Safari.
    Common pop-ups include a message saying the government has seized your computer and you must pay to have it released (often called "Moneypak"), or a phony message saying that your computer has been infected, and you need to call a tech support number (sometimes claiming to be Apple) to get it resolved. First, understand that these pop-ups are not caused by a virus and your computer has not been affected. This "hijack" is limited to your web browser. Also understand that these messages are scams, so do not pay any money, call the listed number, or provide any personal information. This article will outline the solution to dismiss the pop-up.
    Quit Safari
    Usually, these pop-ups will not go away by either clicking "OK" or "Cancel." Furthermore, several menus in the menu bar may become disabled and show in gray, including the option to quit Safari. You will likely have to force quit Safari. To do this, press Command + option + esc, select Safari, and press Force Quit.
    Relaunch Safari
    If you relaunch Safari, the page will reopen. To prevent this from happening, hold down the 'Shift' key while opening Safari. This will prevent windows from the last time Safari was running from reopening.
    This will not work in all cases. The shift key must be held at the right time, and in some cases, even if done correctly, the window reappears. In these circumstances, after force quitting Safari, turn off Wi-Fi or disconnect Ethernet, depending on how you connect to the Internet. Then relaunch Safari normally. It will try to reload the malicious webpage, but without a connection, it won't be able to. Navigate away from that page by entering a different URL, i.e. www.apple.com, and trying to load it. Now you can reconnect to the Internet, and the page you entered will appear rather than the malicious one.
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
      Mac OS X Snow Leopard and malware detection
      OS X Lion- Protect your Mac from malware
      OS X Mountain Lion- Protect your Mac from malware
      OS X Mavericks- Protect your Mac from malware
      About file quarantine in OS X
    If you require anti-virus protection Thomas Reed recommends using ClamXAV. (Thank you to Thomas Reed for this recommendation.)
    From user Joe Bailey comes this equally useful advice:
    The facts are:
    1. There is no anti-malware software that can detect 100% of the malware out there.
    2. There is no anti-malware that can detect everything targeting the Mac.
    3. The very best way to prevent the most attacks is for you as the user to be aware that
         the most successful malware attacks rely on very sophisticated social engineering
         techniques preying on human avarice, ****, and fear.
    4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on
        your computer is intended to entice you to install their malware thinking it is a
        protection against malware.
    5. Some of the anti-malware products on the market are worse than the malware
        from which they purport to protect you.
    6. Be cautious where you go on the internet.
    7. Only download anything from sites you know are safe.
    8. Avoid links you receive in email, always be suspicious even if you get something
        you think is from a friend, but you were not expecting.
    9. If there is any question in your mind, then assume it is malware.

  • Hi!!I want to scale an analogic signal, and I don´t understand very well how interpolated option works in "Scaling and Mapping".

    Can anyone explain to me, the option Interpolated, in the function , "Scaling and Mapping?
    Thank you!!!!!

    When you select Interpolation you then define a table of value pairs; basically the raw data versus actual data.
    For example
    2 5
    4 10
    6 20
    What the VI then does is if the input signal has a value of 3 the Express VI will linearly interpolate between 5 and 10 and will map your value of 3 to 7.5. Again a value of 5 would then be interpolated and mapped to 15.
    Take a look at the attached VI.
    Evan
    National Instruents
    Attachments:
    mapandscale.vi ‏89 KB

  • How to calculate an interpolation...

    Hi Everybody,
    Iu2019m struggling with the percentile calculation using simple interpolation.
    I have following inputs:
    Table:
    Day_bucket             1|     2|     3|     4
    Responses             10|     20|     50|     20
    Cumul_responses     10|     30|     80|     100
    Percentile                     0.1|     0.3|     0.8|     1
    1. Day_bucket u2013 days from 1 to 100 (dimension)
    2. Percentile u2013 percentile distribution u2013 how many % of all responses have been received in a particular day from Day_bucket dimension (measure)
    3.Interpolation equation: d=d1 + ((g-g1)*(d2-d1)/(g2-g1))
    g - percentile you are looking for (in my case 0.9)
    g1 - MAX percentile < 0.90 (in my case 0.8 )
    g2 - MIN percentile > 0.90 (in my case 1)
    d1 u2013 Day_bucket where percentile is equal to g1 (in my case 3)
    d2 u2013 Day_bucket where percentile is equal to g1 (in my case 4)
    d u2013 value Iu2019m looking for (in my case 3.5)
    Now what I need to do is to get the result of above equation into one field. And my problem is that I not able to calculate g1, g2, d1, d2.
    Can anybody help me? Is it actually possible to make such calculation in Business Object?
    Edited by: gonosgon on Jul 20, 2010 2:46 PM

    Hi gonosgon.
    I do think this is possible in Web Intelligence. I think you would need to create some variables in order to do what you need. I am not 100% clear on what you need to do, but if you create some variables in your report, for instance, for g, g1, g2, d1, d2, etc. this may allow you to do what you need. These variables can then be built off other variables.
    If you have access to your universe, then you can simply create the objects you need with these pre-calculated.
    Hope that helps!

  • Photoshop CS6, Free Transform & interpolation on Smart Objects

    Hi,
    I'm really frustrated with this, since in all the previous versions this problem was not present.
    When I try to scale down a Smart Object, by using the Free Transform tool, I get over-sharped edges. I suspect this is an interpolation issue. Mind you when I do the same on a raster layer I can overcome it since there is an option box where I can choose interpolation method.

    flamestudios wrote:
    That worked for me, even if I would prefer to be able to choose interpolation method when I transform Smart Object layers, just like you can on raster ones.
    That not an option and its never an option using DOM scripting code you need to retrieve the users interpolation method set the one you want to use and then restore the users preference.  Adobe even broke that in CS6. If you try the retrieve the user preference and it set to "Bicubic Automatic" which happens to be Adobe's default setting CS6 script encounters an internal error. If you catch the error and you can know the user setting is "Bicubic Automatic" If you change the setting your unable to restore the users setting for like you can not retrieve "Bicubic Automatic" using DOM code you can not set it with DOM code.  Perhaps you can with Action Manager scriptlistener code.  I'll give Adobe some more time to fix this before adding special code into my scripts to get around the CS6 problem.

  • Hey I want to know what resolution a personas 3000x 200x is because I am trying to make one, but the middle part of the picure is movin to the left so some thing is wrong with resolution and interpolation. PS, I use Gimp.

    I use Debian and Gimp program to make my own personas but it seem like I have to know what resolution or interpolation is needed for the best result. I am trying to make one in size of 3000px wide x 200px high but don't know what resolution and interpolation is matching the requirements of Firefox or personas. For ex: in Gimp when scaling an image the interpolation possibilities are 4 like:
    None
    Linear
    Cubic
    Sync

    Try the Personas forum.
    * https://forums.mozilla.org/addons/viewforum.php?f=30

  • Data Interpolation for Automotive Mapping

    Hello all,
    I have a lookup table (see attached jpeg) for the main duration pulse (fuel injection) of a diesel engine, every data point (in msec) can be match to its respective speed (top row --RPM) and pressure (leftmost row --BMEP in bar). However, I do not have the complete map and thus I'm missing some points. I was told that LabVIEW has some neat data interpolation VIs that can be apply to this specific case, anyone knows one or knows how to tackle this problem?
    Thank you!
    Attachments:
    Lookup Table.JPG ‏77 KB

    Well, if you are running on a LabVIEW FPGA then the Linear Interpolation VI may be of interest. In LabVIEW for the PC the Curve Fitting Express VI or the 2D Interpolation.vi found in the NI Example finder can help out.
    Joshua B.
    National Instruments
    NI Services
    NI Support Resources
    NI Training Resources

  • Problem with interpolation

    I've got a problem. In my VI there are three different kinds of interpolation. Fpr ma the best interpolation is the Rat.-Interpolation.
    But in this Interpolation there are extreme errors. Why?
    I need an Interpolation which gives me a
    x- and y- value back.
    Attachments:
    Kennlinie_Interp_Motor.vi ‏434 KB

    Hi Markus,
    when you use to interpolation function y = a + b * x as in "General Polynomial Fit.vi" with 'polynomal order' = 2 . You must recalculate you require X values over this function.
    Or when you want use complicated polynomial {or other } function you can use Formula Node. Look my second part of example. It looking terribly, but it working, and you can use complicated interpolation function.
    Have nice day
    JCC
    Attachments:
    compare_Interp_2.vi ‏101 KB

  • Problem with Spline Interpolation

    Dear friends,
    I've a problem with the Spline Interpolation which returned the error code -20049. I've tried in several ways such as delete the repeat data out, but it didn't work. If anyone can help will be very appreciated.
    Thank you so much,
    Attachments:
    ITH_Calculation.vi ‏248 KB

    The spline interpolation expects your x-values to be all different (and monotonic). However in your data set the x values at index 122 and 124 are identical (and also x(122) > x(123)). If you correct for this the interpolation should work fine.

Maybe you are looking for

  • Cannot install update 13.1.2 for Creative Cloud version of Photoshop

    When using the Adobe Application Manager, trying to update Adobe Photoshop CS6 gives the error: Photoshop 13.1.2 for Creative Cloud Installation failed. Error Code: U44M2P7 When you search for that error code, you get to: http://helpx.adobe.com/creat

  • What are the minimum system requirements for GB 4?

    What are the minimum system requirements for GB 4? I did search this forum but wasn't able to find a direct answer. I'm running version 3.0.4 successfully on a lowly G4 733 but I suspect this is as far as I can go. I'm updating to iDvd'08 and was als

  • ICloud files unable to be viewed or downloaded

    I uploaded both pages and keynote files to iCloud from my Imac and Macbook pro they show up like this.  They are able to be duplicated or deleted but not downloaded. Just started this week and has never happened before that I recall.  I've tried dele

  • Copy text frames and paste in place from source file to opened docs

    Hello All, I have one source indd file which is having 10 small text frames (40pt square) in both pages (Facing pages, Left and Right) on a master page. In that master page there is no frame except that 10 small text frames and the text frame contain

  • Having trouble upgrading to new version of firefox

    I have the setup wizard to upgrade to the newest version on my desktop background. When I hit "next" it says to close Firefox in order to proceed. when I hit "OK" it just brings me to connection wizard box again and same t hing happens. I had orig sa