Is there a way to curve fit a nonlinear implicit function?

Hi
I would like to fit a least squares curve to a set of data points.  I see I can do this using general LSQ fit.vi or Levenberg-Marquadt, but these VIs seem to only handle implicit functions of the form y=f(x,A). 
What if I have a data set from a known implicit function, for example a circle:
(x-x0)^2 + (y-y0)^2 - r^2 = 0
How can I calculate the x0, y0 and r that minimizes the square error?  Can this be done using the L-M VI or a VI from a different toolkit?
Thank you.
Laine

This can be considered as an optimization problem. For a circle, you could use the fitting on a sphere vi (in the math > optimization sub-palette), giving 0 as z coordinates.  See the attached vi.
Chilly Charly    (aka CC)
         E-List Master - Kudos glutton - Press the yellow button on the left...        
Attachments:
Find Circle.vi ‏26 KB

Similar Messages

  • Is there a way to use the preview in browser function without an Internet connection?

    This morning our cable modem was down and I was making some changes to a page in a Muse site I'm designing. I wanted to preview the changes in a browser, but when I clicked on the Preview button (or clicked on preview in browser), I received a notification that it was checking for an Internet connection and the preview page never completed. Is there a way to use the preview in browser function in Muse without an Internet connection?

    Thanks for getting back to me! When our cable modem went down, we were still connected to Airport Base Station, and perhaps it appeared to Muse that we did have an Internet connection. In any case, we have now received a new cable modem and our network is working again. As you suggested, I disconnected from the network and tried preview in Muse again, and now it seems to be working just fine. Perhaps it was just the circumstances of our network problem this morning. Good to know I can use the Muse Preview function off-line!

  • Is there a way to test airport extreme for optimal function

    Is there a way to test airport extreme for optimal function?

    In your Mavericks OS X.
    Go to the WiFi icon on the top right.
    Hold the option key and click.
    At the bottom of the list you will see "Open Wireless Diagnostics"
    Open this and you can diagnose your wireless network.
    While it'sopen hit the Command + 2 and it will open the Utilities window.
    This will give you and overview of interference and what channel is best.
    You can alos run a speedtes over WiFi then run a speedtest directly connected with ethernet.

  • Is there a way to set up an automatic paste function for frequently used phrases

    Is there a way to set up an automatic paste function for frequently used phrases.
    My husband has an unusually long email address which he cannot change - he is not good at typing. I would like to help him by creating a sort of shortcut or auto paste function on his IMac to save him time and frustration. Any suggestions?
    Thanks

    Are you really using an earlier OS than Mac OS 8.6?  That would be either 8.1, or 8.5 if I recall correctly.
    Apple's classic forum, see:
    https://discussions.apple.com/community/mac_os/classic_mac_os?view=discussions#/ ?tagSet=1037
    You need to look for:
    -- remap or rename keyboard keys
    -- keyboard macros
    At this site look for
    http://trace.wisc.edu/world/computer_access/mac/macshare.html#applwindows
    EasyTyper 1.0.2
    TypeIt4Me
    resEdit maybe a possibility ... free
    http://hintsforums.macworld.com/archive/index.php/t-32745.html
    You could creae a file with common words & phrases in it & copy & past.
    SmartKeys 3
    http://trace.wisc.edu/world/computer_access/mac/macshare.html#applwindows
    Robert

  • Is there a way to delete (not disable) "Private Browsing" function so it isn't available to my teenagers?

    # Question
    Is there a way to delete (not disable) "Private Browsing" function so it isn't available to my teenagers?

    It is strongly discouraged to delete nsPrivateBrowsingService.js as it can cause Firefox to malfunction.
    See this comment from Dave Garrett: https://bugzilla.mozilla.org/show_bug.cgi?id=471658#c27
    You can also look at [/tiki-view_forum_thread.php?forumId=1&comments_parentId=419486#threadId429160]

  • Is there a way to overload the Map's toString() function?

    Hello everyone. I was wondering if its possible to overload the toString() function of the Map datastructure supplied by java.
    I looked it up and it says:
    public class HashMapextends AbstractMapSo I looked up AbstractMap and it says:
    public abstract class AbstractMapextends Objectimplements MapAnd I found a toString() function in the AbstractMap saying:
    toString
    public String toString() Returns a string representation of this map. The string representation consists of a list of key-value mappings in the order returned by the map's entrySet view's iterator, enclosed in braces ("{}"). Adjacent mappings are separated by the characters ", " (comma and space). Each key-value mapping is rendered as the key followed by an equals sign ("=") followed by the associated value. Keys and values are converted to strings as by String.valueOf(Object). This implementation creates an empty string buffer, appends a left brace, and iterates over the map's entrySet view, appending the string representation of each map.entry in turn. After appending each entry except the last, the string ", " is appended. Finally a right brace is appended. A string is obtained from the stringbuffer, and returned.
    here: http://java.sun.com/j2se/1.3/docs/a...ml#toString()So I did the following:
    package parse;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.io.*;
    //this class should store all the Messages or "Events" and
    //you can access them based on their EntityID key.
    public class MessageDB extends HashMap
         //database to hold the information
         //     holds the Alerts/messages
         public static Map<Integer, List<String>> AlertMap;
         //Constructor
         MessageDB()
              AlertMap = new HashMap<Integer, List<String>>();
         public String toString()
              return ( )//not sure what to put here...
         //print, outputs the contents of the hashMap
         public static void print()
            //want to print out the Key and all the Messages
              //associated with that key
              Set keys = AlertMap.keySet();          // The set of keys in the map.
              Iterator keyIter = keys.iterator();
              System.out.println("The map contains the following associations:");
              while (keyIter.hasNext()) {
                    Object key = keyIter.next();  // Get the next key.
                    Object value = AlertMap.get(key);  // Get the value for that key.
                    System.out.println( "EntityID: " + key + "\n"
                                  + "Message: " + value + "\n" );
         //overloaded print to print to user screen.
         public static void print(PrintWriter out)
              //want to print out the Key and all the Messages
              //associated with that key
              Set keys = AlertMap.keySet();          // The set of keys in the map.
              Iterator keyIter = keys.iterator();
              out.println("The map contains the following associations:");
              out.flush();
              while (keyIter.hasNext()) {
                    Object key = keyIter.next();  // Get the next key.
                    Object value = AlertMap.get(key);  // Get the value for that key.
                   //out.flush();
                   /* out.println( "   (" + key + "," + value + ")" );
                   out.flush();*/
                   // out.println("------------------\n");
                   out.println("EntityID: " + key + "\n"
                                  + "Message: " + value + "\n");
                   //out.println("------------------\n");
                   out.flush();
         void add(Message msg)
              //getting the position of the List by EntityID if avaiable
              List<String> Alert = AlertMap.get(msg.entityID);
              //checking to see if there is a unique Key already in the Map.
              if (Alert == null)
                   //if there isnt a key in the map, add a new key, and a new List mapping
                   //to the key EntityID;
                     Alert = new ArrayList<String>();
                     AlertMap.put(msg.entityID, Alert);
                     Alert.add(msg.message);
              else
              //adding message to List
                   Alert.add(msg.message);
    }Right now the output is like this:
    The map contains the following associations:
    EntityID: 99999
                      Message: [a test ]
    EntityID: 800
                    Message: [this is a test , again a test ]
    EntityID: 801
                    Message: [again a test ]
    EntityID: 111
                    Message: [a test again yes , a test once again ]You see how its automatically doing [message1, message2,...,message x]
    By me calling this line of code:
    out.println("EntityID: " + key + "\n"
                                  + "Message: " + value + "\n");Because I found out it implicity calls the toString() method when concatinating it to a string.
    What I would like it to display would be:
    EntityID: 800
    Message:
    This is a test
    This is a test again
    any ideas would be great!
    Or is there a way to just iterate over the messages, rather than doing it my way?
    Message was edited by:
    lokie

    Hi,
    When you do a String concatenation in java, calls are implicitly done to #toString().
    Means, you are doing this:
    while (keyIter.hasNext()) {
                    Object key = keyIter.next();  /
                    Object value = AlertMap.get(key); 
                    System.out.println( "EntityID: " + key.toString()+ "\n"
                                  + "Message: " + value.toString() + "\n" );
    }The "[ [/b]... [b], ... , ... ]" you can see in your output is created by the implicit call to List#toString() method.
    You can Override it in an anonymous class by doing:
    if (Alert == null)
                   //if there isnt a key in the map, add a new key, and a new List mapping
                   //to the key EntityID;
                     Alert = new ArrayList<String>(){
                              @Override
                               public String toString(){
                                StringBuilder sb = new StringBuilder();
                       for(String s: this){
                        sb.append(s);
                        sb.append("\n");
                               return sb.toString();
                             };PS:
    toString() is usually used for debbuging only...

  • Is there a way I can use the iPhoto maps function within Keynote?

    Hi,
    I recently brought a Macbook Pro, and am having my first go at using Keynote. Having previously played with iPhoto, there is the map function built in, and I was wondering whether there is a way to use this in Keynote?
    I was hoping to avoid using a screenshot of google maps as its not interactive, and plus quite bland too.
    Any way this can be done?
    Thanks,

    Keynote can not interact with other applications other than launch a web browser, it cant display web content within a Keynote presentation.
    The only way Keynote can be used to display a "live" web content is to launch a browser at a specific webpage, Google Maps for example,
    To try this place a shape on the slide, select it then:
    Inspector > Hyperlink > Enable as Hyperlink > link to webpage;  type in the web address in the URL box

  • Upgraded to iOS 6 and now I can't open anything in the kindle app? I have to say that I have had my ipad3 for 6 months and intensely dislike the problems with using it. Also is there any way of opening more than one screen as it is hopeless otherwise?

    I Have had my iPad for 6 months as I cannot access my work emails using windows. I have to say that it is the most unhelpful device I have ever used and although it looks like there isn't an answer for some of the questions I have asked below, I thought I would try!
    1) I have upgraded to ios6 and the kindle app will open but crashes and disappears when I try to access a book?
    2) is there any way I can open more than one page at a time, as opening one at a time is hopeless?
    3) Is there any way you can replicate the right click function on word? As pasting and copying on the iPad is irritating to say the least!
    4) why can't my Samsung 11 phone connect to my iPad via Bluetooth? A they can't seem to 'see' each other? I may have turned a setting off when I was recently abroad and didn't want huge roaming charges.
    5) Why do the submit buttons on some websites not work and how can I get them to? I never have a problem with windows, but it is often a problem with the iPad.
    6) I have several websites which I have built and usually upgrade on the windows desktop, usually through Internet explorer, but I can't access the sites properly on the iPad (I can see them but can't alter them) and when sending emails through the websites they won't show the page and I can't navigate the page (the size of the email page is bigger than the iPad screen, but I can't either shrink the page to size or move the page around as you normally would on the pad, any ideas?
    7) finally, when roaming abroad recently, I had no problems using the wifi, but when trying to use the cellular data (using the roaming function) I could not get it to work? The ipad seemed to be connected to the network with no problems, but wouldn't actually update the emails? I tried turning it on and off, but that didn't make a difference. My kindle and mobile phone (both also on 3G ) worked great, it was just (as usual) the ipad playing up.
    8) when wanting to alter part of a sentence, I can't always get the cursor in the right place? Sometimes it is simple the wrong line, but often it will only go at the end or start of a word and not where I want it. Is there any way of making it more exact? Again I never have a problem with moving the cursor on windows, either by mouse or on the touch screen function on windows 7. Any ideas? As after pressing the screen multiple times I just want to throw it out of the window!
    IT might just be that I don't have the correct settings (I am a technophobe) but I absolutely hate the iPad and only have it for work emails, it is so annoying that I can get my mobile phone and kindle3g to work fine, but always have problems with the iPad. I am sure it could be good (and for reading emails on the go in the uk it is great, as I like the key board) but it just seems to make everything else difficult.
    i Hope you can help and sorry for asking questions others have, but I am just hoping that something new might have been developed!
    thanks,
    K
    Message was edited by: K Paton

    1) I have upgraded to ios6 and the kindle app will open but crashes and disappears when I try to access a book?
    Try rebooting your iPad, that should fix he issue. I that doesn't work, delete the app and re-download it.  The Kindle books should all be in he Kindle cloud services and you can get them again. I have an iPad2 w/ Kindle app and it works just fine - no issues.
    2) is there any way I can open more than one page at a time, as opening one at a time is hopeless?
    Page as in a kindle book way? turn iPad to landscape position from portrait position. If, however, you mean open more than one application at a time, then no. And not hopeless, as it takes a bit of time to get used to, going from a desktop/laptop format to tablet format.
    3) Is there any way you can replicate the right click function on word? As pasting and copying on the iPad is irritating to say the least!
    It's actually fairly easy. Press down on the word, then you can expand by drawing your finger to cover word/sentence/paragraph/page, hit select or select all then it gives you the option to cut, copy, paste, define. If you want to use a word processing app on the iPad, Pages is a good application.
    4) why can't my Samsung 11 phone connect to my iPad via Bluetooth? A they can't seem to 'see' each other? I may have turned a setting off when I was recently abroad and didn't want huge roaming charges.
    It's the connection on your phone. Samsung Galaxy SII? Android software?  What you have to do is go to the phone's settings and connect via wireless, not Bluetooth. Go to System Settings (on phone) and under Wireless and Networks click 'more' and go to the Tethering and Portable Hotspot option. Set up your mobile wifi hotspot,  name it though it will probably come up with 'AndroidAP', choose a WPA2 security level and put in a password. Go back to previous screen and turn on 'Portable Wi-Fi Hotspot' box. Then on your iPad in the Settings - Wi-Fi section, it should then recognize your phone for tethering. If it's a Windows Phone 7,  I don't know the layout of that software, but presumeably similar.
    5) Why do the submit buttons on some websites not work and how can I get them to? I never have a problem with windows, but it is often a problem with the iPad.
    Sometimes the issue is with the website design, not all websites are optimized for mobile devices - not just iPad but also Android devices. It happens. They're getting there, but occasionally the page might need a refresh.
    6) I have several websites which I have built and usually upgrade on the windows desktop, usually through Internet explorer, but I can't access the sites properly on the iPad (I can see them but can't alter them) and when sending emails through the websites they won't show the page and I can't navigate the page (the size of the email page is bigger than the iPad screen, but I can't either shrink the page to size or move the page around as you normally would on the pad, any ideas?
    It depends on what you use to build the websites on the computer. Recommend a free program on the computer called CoffeeCup Free HTML Editor. I don't recommend using IE period; Firefox or Chrome are my choices on Windows machines. I have two websites that I manage, both using this program. I'm assuming that when you mean you can't access the sites on the iPad you mean to update them? Ostensible there are apps to let you do this. What format are the sites? Without seeing what exactly you mean and what you want to do, it's hard to explain.
    As for seeing full page while emailing within a site, turn iPad to portrait mode, and try to finger-pinch touch the screen to see if that will bring the fuller page  into view. Other option is opening a second tab with same website and just go between tabs to reference material.
    7) finally, when roaming abroad recently, I had no problems using the wifi, but when trying to use the cellular data (using the roaming function) I could not get it to work? The ipad seemed to be connected to the network with no problems, but wouldn't actually update the emails? I tried turning it on and off, but that didn't make a difference. My kindle and mobile phone (both also on 3G ) worked great, it was just (as usual) the ipad playing up.
    If you were outside the US or Canada, my guess is the problem lies within the SIM card in your iPad. If you were outside North America, there are different band levels - I'm guessing you have a SIM thats locked to a particular provider. Band level frequencies differ per country/continent, so a SIM card that will work in Canada/US will not likely work in UK/Europe/Asia/Australia, etc. you will be able to get your emails again when back on a wifi network. Mobile phone may have a different type SIM card (GSM/HSPA) from your iPad SIM. Also, check your email settings.
    8) when wanting to alter part of a sentence, I can't always get the cursor in the right place? Sometimes it is simple the wrong line, but often it will only go at the end or start of a word and not where I want it. Is there any way of making it more exact? Again I never have a problem with moving the cursor on windows, either by mouse or on the touch screen function on windows 7. Any ideas? As after pressing the screen multiple times I just want to throw it out of the window!
    Moving the cursor on a sentence is a matter of putting your finger on the screen where you want it. It's exceptionally easy to do. I'm using the Notes app to write this whole segment and I just need to put my finger where I want to change things and presto it's ready for me to change where I want it.
    Here's a solution: sell your iPad (after you wipe your data off it) to someone who will appreciate it, and put your money towards the Windows Surface Tablet out later this year/early next year, where you can (reportedly) connect a mouse to it. It will have some of the Windows 7/8 functionality that you're more familiar with, or get a netbook.
    - Ceridwyn2

  • Is there a way to swap the Fn key and left Ctrl key

    Is there a way to swap the functions of Fn key and left Ctrl key on the keyboard. I'm used to other keyboards where the keys are switched and I keep pressing Fn when I want to press Ctrl.  I figure I'll get used to it eventually, but when I use the laptop in a docking station with a regular keyboard the control key is in one spot and undocked with the Lenovo keyboard the function key is there instead, which makes it hard to get used to.
    If not is there a way to disable the Fn + Space bar function that changes the screen resolution. The programs I use use control + space heavily and my screen resolution keeps changing when I don't want it to.
    It's a small thing I know, but very maddening.

    Thanks, I took the survey. It's interesting the questions on there were asking about location of keys like page up and page down. I find the position of those keys are not that important to me because I don't use them that much and don't seem to mind looking at the keyboard to find them. Also they are almost always in different spots depending on whether you are on a desktop or laptop keyboard so I guess I'm used to unconsciously switching depending on which keyboard I'm on.
    But the left control key is one of the most heavily used, at least by developers like me (control+c to copy, control+v to paste, and control+space for code assist, shift + control + f to format code, shift + control + r to find resources, etc...). I have to hit that Ctrl button 1000 times a day. And the key is in the bottom far left corner on every keyboard (desk top and laptop) I've ever seen until now. Having to remember to look down at the keyboard to find the key is proving difficult and I think is actually hurting my productivity. Especially control+space (when you are expecting a popup to automatically complete the line of code you're working on and instead the screen blinks, resizes and your whole editor loses focus it really breaks your flow of thought, so thanks a million for helping me turn off the silly screen zoom feature).
    Hopefully I'll get used to it like with the other keys like page up and page down although I've had the laptop for two weeks and it's proving difficult. If I had know that Thinkpads have this layout and how maddening it would be to get used to it I probably wouldn't have bought it, even though everything else about it is great. It's amazing how such a small thing can become such an irritant.
    Well thanks again, and if anybody from Lenovo engineering is reading this post, my vote is for some bios setting on the T61P that swaps the functions of Fn and Left control key. It would save me a lot of grief anyway.

  • Is there a way to invoke DBMS_CRYPTO directly from SQL?

    When I try to do this:-
    INSERT INTO MyTable ( MyName ) VALUES
    DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW ('Graeme', 'AL32UTF8'),
    DBMS_CRYPTO.ENCRYPT_AES128 + DBMS_CRYPTO.CHAIN_CBC + DBMS_CRYPTO.PAD_PKCS5,
    UTL_I18N.STRING_TO_RAW('0123456789ABCDEF', 'AL32UTF8')
    I get
    ORA-06553: PLS-221: 'ENCRYPT_AES128' is not a procedure or is undefined.
    However if I create a PL/SQL function MyEncrypt to do the same thing
    INSERT INTO MyTable Name VALUES ( MyEncrypt('Graeme') );
    it works fine. Hmm.
    Is there a way to invoke the DBMS_CRYPTO package's functions directly from SQL?
    Edited by: sparky62 on Nov 23, 2008 7:46 PM

    You cannot reference packaged constants from pure SQL. You could replace the argument
    DBMS_CRYPTO.ENCRYPT_AES128 + DBMS_CRYPTO.CHAIN_CBC + DBMS_CRYPTO.PAD_PKCS5,with the equivalent constants, i.e.
    6 + 256 + 4096Of course, that isn't likely to be nearly as readable and/or maintainable as the first approach.
    Justin

  • HT201822 Is there a way to improve Apple's default "ignore accidental trackpad input" function?

    I find I frequently end up typing in the wrong place and/or deleting text because the size of the trackpad leads me to touch it accidentally, usually with my right hand below the thumb. Is there any way to improve on the built in function in Lion?

    http://www.apple.com/feedback/macosx.html

  • Curve fitting gives input, at the output

    Hi everybody, i am having a problem at curve fitting function,
    i take at output, what i give as input, where do i make mistake?
    at example i give 4 values, if i enter 6 values it works, but i need to do it with 4 values.
    any ideas?
    thanks
    Solved!
    Go to Solution.
    Attachments:
    curve fitting.vi ‏16 KB

    Your function is a simple quadratic polynomial, so you should use the general polynomial fit function instead. Don't overcomplicate things
    LabVIEW Champion . Do more with less code and in less time .

  • Is there a way to modify Incase Mini Car Charger so it will fit into iPhone 5s in a case?

    I should have read the reviews in the Apple Store before buying the Incase Mini Car Charger before I bought it: the material around the lightning connector is much thicker than that in the Apple cable (which broke after not much use) and won't fit into the 5s with the case I have on the phone. Is there a way to "shave" the rubbery material to make this work?

    dumdidadida: Thanks for your reply, but it doesn't address the problem. HSTS is designed to FORCE the use of https, this is a good thing in most cases. However, HSTS is problematic in that it incorrectly assumes that all users trust the default list of CAs and makes the adding of exceptions impossible even by advanced users.
    torprojec.org is just an example, this effects every HSTS site. You can reproduce this problem yourself in version 17 or later if you temporary disable "DigiCert High Assurance EV Root CA" in your certificate store and then visit torproject.org. You will notice the ability to add exceptions has been removed and that the cert_override.txt file found in the user's profile is also ignored.

  • Is there a way to view/delete apps that won't fit on the 11 screens?

    I have more apps than fit on the 11 available screens - is there a way to view/delete apps that aren't on the 11 screens? I know I can launch them from the search facility, but that doesn't give me a comprehensive list or the ability to remove?

    You can only remove them in iTunes on the computer.

  • Is there a way to change the color of the Bezier Curves and points to a different color other than black  I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent

    Is there a way to change the color of the Bezier Curves and points to a different color other than black  I find it perplexing while setting points and curves working on a photo that needs to be separated from it's background for placement on transparent backgrounds. Any thoughts?

    Yes. Well, sort of: instead of a "path", set the pen tool to "shape" in the tool properties. Then set the fill colour to transparent, and the stroke colour to the colour you want. You can also set the stroke width.
    Not perfect, but at least you can see the path more clearly - the anchor points and handles still remain the default colour. Open the path panel, and right-mouse click the path shape to create a selection based on that shape. The Paths panel menu also allows you to create work paths based on that shape.
    Unfortunately when you try to move the handles the black thin outline appears again until you release the mouse button.
    This is one of several things that works better in Photoline: in Photoline, once the path is set to a specific colour, editing the path uses the actual colour and stroke width. which is extremely handy for creating path based selection with awkward background colours and/or a high resolution screen. In Photoline the handles and bezier points are also much, much larger, which makes it rather simpler to work with as well - especially on a higher resolution screen. And when selected the handles and points are a clear red with a black outline - again easier to spot and identify. I just works better, in my opinion.

Maybe you are looking for

  • Cannot find Main Header in XMBMessage

    Hi I am implementing a JDBC Receiver using the J2SE Adapter Engine. We've already implemented another JDBC Receiver which works fine, but for the payload shown below I receive the following exception from the J2SE Adapter Engine:   com.sap.aii.messag

  • Monitor hooked up to G3 powerbook is extension not mirrored

    My screen went on my G3 powerbook black model. I hooked up a monitior but it is acting as an extension. There is no key on my key pad to change it to mirror plus my apple key does not work. Anyone know how to switch this? Thanks,

  • Safari/Firefox - Failed to open page

    Since I upgraded to Snow Leopard there have been a radical increase in the amount of times Safari AND Firefox cannot find the server of a webpage, to the point where 3 out of 10 pages load first time. It is incredibly annoying especially when I am tr

  • How to transmit V/A signal over internet?

    I have transmit the signal over network successfully,but how to transport them over internet? I use AVTransmit2.java or VideoTransmit.java can transport the V/A signal over network,but the sample need to fill in the parameter. I hope transmitting V/A

  • HT2638 Where is the iPhoto library on OS X mavericks??

    I have recently upgraded my Mac to OS X Mavericks and I can't seem to find the iPhoto library! Can someone help me find it!