How do I get an interpolat​ed scalar value from a 2D lookup table z=f(x,y)?

I have a table of numerical values.  Rows correspond to discrete values of a parameter, columns to discrete values of a second parameter.  I want tin interpolate a scalar value from the table :
Table Z = f(X,Y)
find Zi,j corresponding to specified X and Y values (which may not be the exact discrete valuescorresponding to rows and columns).
So, I want to find Z(1.5, 3) from a table
    X    1      2     3
Y
2       10   15    20
4        50   60   70
The results would be Z = 33.75
The LUT routines interpolate an entire table rather than giving a single answer.  earlier discussions have posted routines that find the nearest table entry but do not interpolate between entries.
This sounds very simple....
Thanks.

Have a look at the bilinear interpolation examples quoted in the various links of this idea.
(Use threshold array to get the fractional array index from the axis mapping)
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • How can I get scripting access to color values in the indexed Color Table?

    Hey all,
    I'm relatively new to Photoshop scripting, but I've just finished a script that helps my fiance with some very tedious tasks related to textile design.
    The last issue that I'm having is that the image I start with is indexed and has a very specific Color Table pallete ( 2-12 colors max + black and white, so 14 max total, sometimes as few as 2 ). Part of my script, I create a number of color chips and fill them with black currently... What I'd like is to be able to get a count of the colors in the Color Table and put the actual color values as hex into an 1 dimension array, so that I fill those black chips I've made with the actual colors from the Color Table.
    ( I don't know if it makes a difference but I'm converting the image to RGB mode at some point in the script, and back to Indexed Exact ).
    Can anyone please help me do this? Needs to be compatible with CS5 and CS6 ideally.
    Thanks!!

    Cheers for that, your code works but what had thrown me was that the collections appear to be empty - so I hadn't actually tried retrieving one, I just assumed I was looking in the wrong place.
    So if I do this in my Immediate window:
     App.Current.Resources.Count
     0
    Yet when I request it, I get one:
     App.Current.Resources["TitleTextStyle"]
     {Windows.UI.Xaml.Style}
         base {Windows.UI.Xaml.DependencyObject}: {Windows.UI.Xaml.Style}
         BasedOn: {Windows.UI.Xaml.Style}
         IsSealed: false
         Setters: {Windows.UI.Xaml.SetterBaseCollection}
         TargetType: {Name = "TextBlock" FullName = "Windows.UI.Xaml.Controls.TextBlock"}
    Looking at the resources object itself, I get similar apparently empty collections:
     App.Current.Resources
     {Windows.UI.Xaml.ResourceDictionary}
         base {Windows.UI.Xaml.DependencyObject}: {Windows.UI.Xaml.ResourceDictionary}
         Count: 0
         IsReadOnly: false
         Keys: Count = 0
         MergedDictionaries: {Windows.UI.Xaml.DependencyObject}
         Source: null
         ThemeDictionaries: {Windows.UI.Xaml.ResourceDictionary}
         Values: Count = 0

  • HT1386 My MacBook Pro HD crashed.  It is all up and runmning except for one issue.  I have about 200 songs on my iPhone but have only gotton 53 back on my laptop and those are the songs I purchased via iTunes. How do I get the rest of the songs from iPhon

    My MacBook Pro HD crashed.  It is all up and runmning except for one issue.  I have about 200 songs on my iPhone but have only gotton 53 back on my laptop from my iPhone and those are the songs I purchased via iTunes. How do I get the rest of the songs from my  iPhone back onto my HD. 
    The songs I'm not able to import casme from CD's.  Nothing from napster etc.
    I've tried and tried to import them rom iTunes vis "Library"  " Import"

    Hey kbert73
    I would do a transfer of purchases from the phone and not sync. If you sync then it will want to start over and sync music that is on the MacBook Pro. If you want to transfer the music, check out the article below that will give you multiple options on how to move. I have also provided on how to sync with multiple computers.
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/ht4527
    Using iPhone, iPad, or iPod with multiple computers
    http://support.apple.com/kb/ht1202
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • How can I get iTunes to display the tracks from a CD in their original (album) order?

    To be absolutely honest, I don't really understand what this box is for, so I shall just use it to repeat and expand on my question. (I have already sent a "Feedback" comment on the same topic).
    How can I get iTunes to display the tracks from a CD in their original (album) order?
    It seems to me that there is something very basic wrong with the way iTunes handles CD Tracks.
    Professionally produced CD tracks are seldom if ever in a randomised order. Why then does iTunes seem unable to display the tracks in the order they appear on the original CD source - whether from a personally owned CD or from a download from the iTunes Store?
    Some music demands a specific, non-alphabetic sequence in order to make sense. Why does it seem that iTunes only offers Alphabetic, or reverse alphabetic order - both of which make a nonsense of the original, often intended order of tracks?
    Why not replace the so-called "cover-art" in the bottom left hand corner if the iTunes window - which, while it may look attractive to some, gives the barest of information concerning the original disc, with a list of the original CD tracks in their original order, so that the user can easily reestablish the order in which they should be played.
    As I would expect legibility might be a problem with doing this, why could not the original contents, (in their original order), at least, be displayed when the "cover art" is double clicked-on - the result of which at present gives me an enlarged version of the "Cover Art". While on the subject of the contents of the source disc, what about all the album notes which someone takes trouble to write in order to increase the appreciation of the music on the CD and the listener's general background knowledge of the artists involved. Such notes, it seems to me, have considerable intrinsic value in their own account. I would, I think, normally be prepared to buy such "Sleeve notes" - so long as a "taster" was supplied (as it is for the music) - for something like the cost of a single 'Tune" on iTunes.
    These two aspects let Apple iTunes down enormously, in my opinion. I think that by chopping even quite protracted sequences of music up into bits does no one any favours - except perhaps Apple's already quite substantial bank balance. People have to be aware that two and a half, to three and a half minutes is a very short time to develop a piece of worthwhile music, and that there are many, many composers, not all of whom are alive today who have written music that huge masses of mankind value for the enrichment of their lives and the human condition in general.
    Please make the viewing of iTunes tracks in their correct order by default possible. By all means have the alphabetical variations available as offering a different approach to the music, but not the sole approach to it - PLEASE.
    Frustratedly yours
    Alan Whitaker
    PS I work at my old 24" iMac Intel Core 2 machine which runs OS "Tiger" - because it is more beautiful to look at, the screen is more pleasant to work on, and because, in some ways it is more capable (it will run FreeHand MX without needing a "patch"), than my more recent 21.5" which runs "Snow Leopard". (I don't find it that much slower, either).

    Dear Mike
    Thanks for the support. I am utterly amazed that after all the hype about how good iTunes is that it cannot play a downloaded CD in the correct order, and that what that order should be is not available directly from within one's own iTunes installation. (I know that one can go back to the iTunes Store to check what the order should be, but having downloaded the tracks surely iTunes is clever enough to retrieve this important information.
    My iTunes to differ from yours in that I have also noticed that it seems unable to download copies of my "talking books" in the correct order either. But in my case it downloads them - from a CD - in order, but with the first track downloaded first - so that it appears at the bottom of the column of tracks so that it would get played last! (At least this is, while being inexplicable, a relatively "logical" bit of blundering and because of this is relatively easy to put right!).
    I like many genres of music, some of which are not really programmed except perhaps by the artist performing them. I know that Frank Sinatra was very careful to programme his album songs to obtain a particular effect and in relation to the keys of the music. iTunes presumes to know better.
    Film scores may be totally randomly put together, in some cases, but in others the order is vital to one's appreciation of the music as a whole and how it relates to the plot of the film.
    In symphonic music most works are divided into sections and are conceived by the composer that way. Some individual sections may gain a life of their own if played separately, but they are never complete in the sense that the composer envisaged them without being placed in their proper context.
    Opera and probably most choral music too, is similar except that the words may well become meaningless if the order is changed at the whim of a piece of ill-written computer code, while ballet music has to be heard totally within its sequential context or it becomes meaningless.
    Finally, I would venture that iTunes, by jumbling up the order of the tracks as recorded on a CD, does an immense disservice, not only to the music on a particular CD, but to music in general, by expressing everything in terms of "Songs" - which it seems to interpret as stand-alone items of between 2 and 4 minutes whatever the genre. Even the way the iTunes publicity speaks of how many "songs" it can store instead of how many minutes or hours of recorded sound. This has to be another brick in the wall of "dumming-down" of people's expectations, and the shortening of their attention spans.
    I don't know about anyone else, but I feel betrayed by Apple over this. Perhaps the look, feel and general presentation of an item are not the most desirable features of a consumer product. Maybe it should be judged more on it fitness for the purpose for which it was sold. There is one other possibility - that Apple are trying to redefine "Music" - and that everything that lasts longer than about 3.5 minutes or is in the form of what could for want of a better term be called symphonic in the broadest sense is something else - not "Music" within Apple's new definition, at all!
    Well that's off my chest! now I can get down to creating some sort of order in my iTunes Libraries, knowing that I have to reconsult all the sources in order to confirm the source playing order.
    Anyway thanks again. At least I know that it is not just me
    alanfromthatcham

  • Iphone4 would not restore Error -50. I have tried to restore and it restored it to the point that it created after 5.0 was installed. How can I get it an older restore point from my backups and restore it on another computer? The phone has been wiped out.

    Iphone would not restore---- Error -50. I have tried to restore, and it restored it to the new point that it created after 5.0 was installed. How can I get it an older restore point from my backups and restore it on another computer? The phone has been wiped out. I can see earlier backups in my C:\Documents and Settings\user\Application Data\Apple Computer\MobileSync\Backup folder. There are four subfolders in this address. I need my contacts, photos, and messages back. I know this is a common error but I can not figure it out. I have ran the other troublshoot items in the error steps for 13 and 14 like apple says. Is there a way to call apple and get a step by step of how to restore from another restore point? Does anybody have a solution????

    It tells you to go to Error 13 and 14 if you receive error (-50).
    Here is what I have tried...
    Error 13 and 14: These errors are typically resolved by performing one or more of the steps listed below:
    Perform USB isolation troubleshooting, including trying a different USB port directly on the computer. See the advanced steps below for USB troubleshooting. I have moved it around to different ports.
    Put a USB 2.0 hub between the device and the computer. Didn't change anything.
    Try a different USB 30-pin dock-connector cable.
    Eliminate third-party security software conflicts. Removed all virus protection and firewall.
    There may be third-party software installed that modifies your default packet size in Windows by inserting one or more TcpWindowSize entries into your registry. Your default packet size being set incorrectly can cause this error. Contact the manufacturer of the software that installed the packet-size modification for assistance. Or, follow this article by Microsoft: How to reset Internet Protocol (TCP/IP) to reset the packet size back to the default for Windows.Used the Microsoft fix it.
    Connect your computer directly to your Internet source, bypassing any routers, hubs, or switches. You may need to restart your computer and modem to get online. Doesn't matter.
    Try to restore from another known-good computer and network. I do not know how to do this or how to find the correct/full/complete restore point. There should be more information for this.

  • How can I get a list of database names from environment

    Hi,
    How can I get a list of database names from environment.
    I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
    I use java interface, is it supported?
    Thanks.

    Hello,
    I don't know if it would work for you, but have you checked the db_archive utility at:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
    Check the -s option.
    Thanks,
    Sandra

  • How can I get itunes to play one album from start to finish, especially when there are different artists on it?

    How can I get itunes just to play albums from beginning to end? Often if an artist has a guest artist, or there are 'various artists' on the album, it stores them all separately, so listening from beginning to end becomes not one click away, but a multitude of clicks away just to make a play list which returns the album to its original state. Why can't Apple do this as a default?

    If your music is sorted by "Albums", even a compilation is a single click.
    'various artists' on the album, it stores them all separately,
    That happens when you sort your music by "Artist".

  • How can I get my books that I download from the Library that are WMA files into my I tunes so I can listen to them

    How can I get my books that I download from the Library that are WMA files into my I tunes so I can listen to them. They have a ton of books but I can only listen to them from my windows media player and I wouldlove to download to my I pod but I have tried everything I can think of it they won't go over.  Someone said all I had to do was copy them over and they would convert but I can't even get them to copy.  Thanks.

    Well it started happening AGAIN with my 2nd IPod. No matter what I did, it Itunes would NOT restore it!
    I finally installed Itunes on my hubby's PC at work and managed to get it restored there.
    Apparently, there must be some sort of compatibility issue with the windows version of Itunes and some other piece of software on my pc.
    And one more important thing! I had to follow the instructions in the other thread that talks about how to correctly uninstall itunes and quicktime, in order to completely eliminate ALL traces of my "first" ipod's existence so it wouldn't demand that I restore it.
    I think the software got "confused" and thought when I connected my 2nd ipod, that it was the 1st and that it still needed to be restored.
    Basically, this is just POORLY written and POORLY tested software!

  • How do I get my iphone 3g to print from my hpc8100 printer

    How do I get my iphone 3g to print from my hp c8100  printer

    There is 3rd party software out there to install on your computer, to be able to print from a device using iOS 4.2.
    For example Printopia if you're using a Mac.
    You'll need at least an iPhone 3GS to be able to do so without other 3rd party software:
    AirPrint Basics

  • How do i get all my music to transfer from an old ipod to new ipod touch? when i log into my account just my purchased music appears?

    how do i get all my music to transfer from an old pod to a new ipot touch?  Shouldn't this be automatic when i login to itunes?

    To transfer non-iTunes purchased music from an iPod to a computer requires use of a third-party program like one of those discussed here:
    Copy music from Ipod to new computer...: Apple Support Communities

  • I did an update and only only the music purchased from itunes store is there all the cds I burned to it are gone. Tried syncing ipod but it says it will wipe all content. How do I get all my music back. gone from over 6000 songs to 250?

    I did an update and only only the music purchased from itunes store is there all the cds I burned to it are gone. Tried syncing ipod but it says it will wipe all content. How do I get all my music back. gone from over 6000 songs to 250?

    See Empty/corrupt iTunes library after upgrade/crash.
    tt2

  • How do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    how do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    ok so i have my own i tunes library - how do i get all my old apps onto my new library?

  • How do you get your tunes and voice recordings from your iPod Touch into iTunes on a new computer if you don't have Mobile Me?

    How do you get your tunes and voice recordings from your iPod Touch into iTunes on a new computer if you don't have Mobile Me?
    iTunes on tmy new computer shows none of my data and I fear if I sync my iPod with the computer all will be deleted on the iPod.
    I still have everything in iTunes on the old computer.

    Just move your iTunes library to you new computer.  You can transfer iTunes purchases to you new computer from your iPod by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/HT1848Make sure you also move the backup.  You an find where the the backup is located here:
    iPhone and iPod touch: About backups
    You can move other items by:
    Best iPod to PC
    After you move you stuff to the new computer, restore the iPod from backup.

Maybe you are looking for

  • How can I remove my old iPad from Icloud!

    The problem is I've sold my ipad2 and that iPad was used by my account! But now this is not belong to me anymore, how can I remove the iPad from my account! When she opens ICloud , I can see her photo via photo stream! That makes me in trouble! Plsss

  • Ive updated my iphone 4 to ios5 and the music will not play atall even though its all on the phone is anyone else having this problem?

    Obviously Ive had the same errors originally but the software has updated fine now. But for some reason the music on the phone will not play atall! with or with out headphones. It seems too just be staying at 0.00mins and even if I fast forward it it

  • Problem with check box need an idea

    hello i need some help. i am tring to make a attendence register as an assignment. what i am tring to do is that i can add student name in a file and then retrive them from a file and then mark there presents or absents.the part i cant get done is ho

  • BUG?: Code Editor – Completion Insight  - Autogenerate GROUP BY clause

    With the "Autogenerate GROUP BY clause" enabled the following problem occurs: Coding an inline select in an aggregate query:   SELECT   (SELECT   DEPARTMENT_NAME               FROM   departments d              WHERE   d.department_id = e.department_i

  • Licence limitation for 500 users

    we use acrobat 9 pro. we have loaded pdf forms toour site. these forms are for our customers use. we've built a button on the forms that submits the form, i mean, it transmits the data that our customer typed on the form to our site. do i have to use