Complex Bessel functions in LV 2009?

Can anyone please clarify whether the Bessel functions in LV 2009 operate on complex inputs and give complex outputs? The "Help" text mentions only real outputs.
A quick test on the Bessel function Jv of zeroth order seems to indicate that it accepts a complex input but delivers a real output. Does it just ignore the imaginary part of the input?
Any input much appreciated, thanks!
Peter
Solved!
Go to Solution.

Hello Peter,
LabVIEW MathScript can support real-order Bessel functions with complex inputs.  Reference the help for the bessel_j function, in particular.
Grant M.
Senior Software Engineer | LabVIEW MathScript | National Instruments

Similar Messages

  • Bessel function best fit

    Hi all,
    Quite new to LabVIEW. I am capturing diffraction images that are described by Bessel J functions. The maxima of the diffraction correspond to the maxima of the Bessel J functions ( or zeros of 1st derivative).  I wish to fit the diffraction image intensities to a Bessel J function , pixel value -> best fit to x in J(x). Has anyone previously done this before? I know the order n of the Bessel function but not necessarilly the pixel where x=0.
    Similarly, I hope to fit the diffraction image of a pinhole which is an Airy Disk to use as calibration ie pixel -> m^-1.
    Any help or suggestions would be gratefully accepted.
    Regards,
    Leeser 

    Leeser,
    Considering you are relatively new to labVIEW, your program was very well structured and seems to approach the problem in the right manner. As you correctly guessed right from the beginning, no-one it seems has attempted fitting a Bessel function to their data. The 'best-fit' VI's found in the 'Fitting Pallette' are more generally concerned with parametric, powers and exponential type functions, rather than more complex differentials such as the Bessel. In cases similar to yours, it seems that people haave tried adopting the Levenberg-Marquardt algorithm which is a Non-Linear Fitting VI found in the Fitting Pallette. This is the Lev-Mar VI which Kristie Elam reccomended you using for the Airy disc. This function allows one to define the equation with which they wish to fit their data, but due to the complexity of the Bessel function, this may be quite tricky.
    I have been working on an example VI which provides the basic structure of what you need to implement in to your program. The Bestfit VI converts a picture using the IMAQ functions and then plots the converted data. You can manipulate the row control to choose which row of pixels you wish to analyse. The VI then calls the Lev-Mar Best Fit function which in itself calls the Bessel Formulae VI which is a template for the Bessel Formulae that the Lev-Mar function will use in its best-fit approximation. It is within this VI that you will need to enter the neccessary formulae to produce your theoretical Bessel function. The Lev-Mar Bestfit function can then use this data to plot a Least Squares Best Fit approximation against your spectrum.
    Aswell as the Bestfit and Bessel Formulae VI's, I have attached a Gaussian Example VI which gives a complete example of a Bestfit approximation using this method. Furthermore, I have attached a couple of VI's that I found which I hope may help you to develop the Bessel formulae. These include a table of Bessel roots, which you may be able to use to produce a table of the derivative roots, those found on your schematic.
    I really hope this information and the files I have attached will be of use to you, I'm just sorry there isn't a direct tool with which you can produce the bestfit approximation. Keep me posted on your progress as I've been working on this for a few days now and would like to see how it goes!
    With regards to the Airy disc, I would keep on with the files that you received from Kristie Elam, hopefully using the same method with both the Bessel functions and Airy disc might make things easier for you.
    I hope this informtaion is of use to you, best wishes and good luck!
    Rob
    Rob L
    NI Applications Engineer
    UK & Ireland
    It only takes a click to rate this message ;-)
    Attachments:
    Bessel Bestfit.zip ‏98 KB

  • Bessel function accuracy

    From a side-by-side comparison with results generated by both Maple and MatLab, I realized that although the output of the VI "evaluation of Bessel J function" is a double-precision array, the accuracy is only up to single precision. Is there any simple way to increase the accuracy to double precision?

    Hi George,
    I just tested out the Bessel Function Jv(x) evaluated at J0(0) and you are absolutely right! In LabVIEW 6.1, it does seem that the function is only accurate up to a single precision.
    The Bessel Function Jv(x) VI has been corrected in LabVIEW 7. The function returns 1.0000000000000000 as expected. I would suggest upgrading to LabVIEW 7. If you do not have a newer copy of LabVIEW and would need to purchase an upgrade, talk to the Customer Service Representative (CSR) for your area or contact any CSR at (888)280-7645 regarding this issue and they might be able to help you out.
    I have attached screenshots of the output of the Beseel Function Jv(x).vi for both LabVIEW 6.1 and 7.0 for your interest.
    Thanks again.
    Kileen C.
    Applications Engineer
    National Instruments
    Attachments:
    bessel_LV61.GIF ‏20 KB
    bessel_LV70.GIF ‏20 KB

  • Hp 35s integrating with complex numbers/functions

    Are there any examples of how to integrate a complex function for
    the HP 35s..the manual suggests its possible..but, I can not find one
    example...anywhere... I am just interested in testing.....I do
    not want to break things into parts etc...I just want to try
    e^z for example, where z is complex..any help?
    I have tried xiy, rTheta, x+iy...syntax errors or non existent..funny

    Hi,
    The manual states that complex numbers can be used with EXP(x), but it does not mention anything about using complex numbers for integration. Edit: I missed some text in the manual, see below.
    As far as I can tell it cannot do integration with complex numbers. (The 50g can do this.)
    However, you may get a more definitive answer if you ask your question here:
    http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/forum.cgi
    EDIT: that forum has moved to a new version:
    http://www.hpmuseum.org/forum/forum-4.html
    Note: I do not work for HP, I just like playing with calculators :-)

  • I need help setting up a complex automator function. Please, read below

    I am a teacher and I need AUTOMATOR to create an audio file for my tests. So, in greater detail, this is what I need done:
    Open the existing MS Word text document
    Turn the text of the first question and answer options A, B, C, D into voice
    Save that as an audio file named “TEST ‘X’, QUESTION #”
    Upload this audio file to a given server
    Move to the next question and do the same; repeating until no more questions exist.
    Any suggestions on how to get that done would be greatly appreciated.
    Thanks!
    MP

    You will need to be able to connect your camera to your computer so the computer sees the live video. Then you may need to use an application like DVdriver to have the OS see the video as a 'webcam', which will enable it to be used by Connect.
    DVdriver: DV Camcorder to WebCam Converter Software by Eagletron 2014-05-28

  • Mapping activity step in BPM and related complex functions/conversions

    Hello Experts,
    a) I am trying to find out the complex conversions used in BPM process modelling activities such as mapping activity.
    What are the different complex conversions/functions which are very widely used/required in BPM projects?
    I am talking about custom functions and not the standard functions and rules provided by BPM mapping editor.
    b) How do we write a log function which can be used in mapping to log some attributes used in mapping to the java log.
    It is just additional logging feature on the top of standard BPM logs. But this additional log feature will be useful in reading logs for each step.
    c) I am getting only one document having 3 examples for EJB mapping function (concat, filter, and one good fair )-  can anyone provide any other functions and details around in this area?
    thx
    mike

    Hi Mike,
    Strongly suggest you close this discussion and create 3 new discussions - one for each separate question.  When you pile up multiple questions, often people aren't sure which one to answer, and the discussion stream tends to get very confused. 
    That's likely to be why no-one's responded in the last 5 days.
    Rgds,
    Jocelyn
    with my SCN Moderator hat on

  • Duplicating Effort in SQL functions

    Hi, If I have a piece of SQL such:
    SELECT
          SUBSTR(really complex nested functions [no PLSQL function / context switching however]) AS COL1,
          LENGTH(SUBSTR(really complex functions [no PLSQL function / context switching however])
    AS COL2
    FROM mytableThe second column is obviously just the length of COL1
    Does SQL engine when processing the function for COL2, execute the "really complex function" again - before getting the LENGTH? Or does it just reuse what it already calculated in COL1?
    If not, is there anyway of allowing the "Really complex function" result resued by other COLs?
    I do not wish to use a PLSQL function.
    Thanks for any help

    Well the CBO is pretty clever, it won't do two passes if it realises it's not necessary. Here's a bit of simple obfuscation SQL with and without inline view explained:
    EXPLAIN PLAN
    SET STATEMENT_ID='ORIG'
    FOR
    SELECT last_name, '555' || Translate (Substr (phone_number, 4),
                        '0123456789',
                        '5678901234') tel,
              Length ('555' || Translate (Substr (phone_number, 4),
                        '0123456789',
                        '5678901234')) len
    FROM employees;
    EXPLAIN PLAN
    SET STATEMENT_ID='ILV'
    FOR
    SELECT last_name, tel, Length (tel) len
    FROM (
    SELECT last_name, '555' || Translate (Substr (phone_number, 4),
                        '0123456789',
                        '5678901234') tel
    FROM employees);
    SQL> START XPLAIN
    Explained.
    Explained.
    Original
    Query Plan
    SELECT STATEMENT Cost = 3
    TABLE ACCESS FULL EMPLOYEES
    Inline View
    Query Plan
    SELECT STATEMENT Cost = 3
    TABLE ACCESS FULL EMPLOYEES
    Rollback complete.
    SQL>
    You might also look at the 11g virtual column feature where you define columns of a table as functions of other columns.

  • Using a dll function that does not have any inputs from a VI

    Hello all, I'm very new to Labview, I have wraped a dll library using the LVlib wizard and now I am trying to use it in a project.  I have a function that does not take any inputs or return any thing except that a struct is populated with some status information as part of the call.  I am able to draw a StartInterface VI because my void startInterface(const char* configFile, struct status_struct* status) takes the location of a configutation file as an input. But I can not figure out how to connect my Call Library Node to my a function vi that does not have any inputs ( void shutdownInterface(struct status_struct* status)). 
    Note that the status struct is deffined to be only and out put at the creation of the LVLIB.
    Thanks, Mike

    Thanks for the responses guys:
       I think I am aware of the conotations of inputs and outputs when I created the lvlib I specified the argument  struct status_struct* status as only an output instead of the default of input and output.
    I do not think that I am doing anything as complex as function callbacks. My immediate goal is to have an executable (I have application builder) with two buttons and two three text fields one text field for the input of the config file, two text-fields for a cstring that is contained in the status struct; one button to start the interface and one button to stop the interface. 
    This is in all likely hood a case of my self being too dense and missing something fundimental ;-)  I just can't figure out how to wire the shut down method after I've configured the call library node. See the attached pictures:
    Attachments:
    Start.jpg ‏7 KB
    shurtdown.png ‏9 KB

  • SPEL: Can I use java expressions for complex rendering?

    Hi
    I would like to avoid complexity in extending controllers and VO's in iProcurement by adding some rendering control to my page attributes such that the value of "rendered" is a more complex SPEL function.
    E.g.:
    normally I could use:
    rendered="${oa.VO.isFieldRendered}"
    where the above attribute exists in the VO.
    However, I would like not to have to create a new Attribute, but use the following:
    rendered="${oa.VO.Field.equals("Y")}"
    Does anyone know if this kind of thing is possible?
    Cheers
    Chris

    Hey Jon! Will e-mail ya later!!
    Tapash: Am trying to use an existing VO field to determine the rendering of a page item. The current field has a Y/N value, not boolean which the render SPEL generally uses.
    The only way I know how to do this is to extend the VO and add a new calculated boolean field. I can do this, but was hoping that SPEL might provide an alternative..
    Thanks
    Chris

  • Complex conjugate in MIMO

    hi there,i m new to labview and working on mimo........now i have a problem in complex conjugate......as its output isnt working
    ur suggestions will be appreciated
    regards

    What are you using as the inputs or inputs of the complex conjugate function?
    Scott A
    SSP Product Manager
    National Instruments

  • Oracle 10g EE - Spatial Index, C Interfacing & Custom C Functions

    Hi everyone,
    I'm doing a research project concerning indexing and I'd like to do some testing using Oracle DB.
    My questions are:
    1) I've noticed here (http://www.oracle.com/database/product_editions.html) that Spatial is not included in EE, is this just the complex spatial functions? Is the R-tree (or some other spatial index) still available for simple queries?
    2) I've read that Pro*C is the simplest way to use Oracle from C, however Pro*C does not exist in 10g, only OCI. Is there a simpler way to use Oracle from C other than OCI?
    3) How do I go about creating custom functions which are written in C (for speed reasons)?
    If not all of these are possible in EE, which version of Oracle would I need?
    Thanks heaps,
    Martin.

    From the binaries point of view Spatial is included in the Enterprise Edition, the fact that it says it is an option means you have to buy a license additional from the enterprise Edition license to be able to use it.
    You can find several demos based on MapViewer which are written in java, so IMO Pro*C is not the best suitable way to start working with Spatial Data, I suggest you to consider Java instead.
    ~ Madrid
    http://hrivera99.blogspot.com/

  • How to show 2nd transfer Function in Lv 7.1

    hello,i have a problem with showing the result of second order transfer function in LV chart.
    with matlab, i have a result like this pic bellow.
    this pic is a result from second order TF "1/(S^2+0.4S+4)"
    could you help me if i want to show the same graph in LV chart from that second order TF?
    i'm still using LV 7.1 trial version
    thank you for your attetion.
    Attachments:
    Graph With MATLAB.jpg ‏21 KB

    Hi fanny,
    What part are you having trouble with in LabVIEW?  The easiest way to get your data into a chart would probably be to get an array of the values of the function and just wire them to the chart.  If you are having difficulty implementing the function in LabVIEW, this is a good case for the Formula Node.  The formula node is a fairly easy way to implement complex mathematical functions in LabVIEW.
    You may also be interested in the PID toolkit for LabVIEW which can help you implement sophisticated control algorithms.
    Hope this helps!
    Megan B.
    National Instruments

  • Complex posting via inbounc IDoc

    Hi,
    we are implementing functionality to create FI invoices by inbound IDocs using IDoc type ABB_INVOICE_RECEIPT03. We need to have the IDoc import functionality access the complex posting functionality which we are used to access manually from transaction FB60.
    Unfortunately it seems to us that this functionality is not available when using this IDoc type. Are we correct about this? We hope not!
    Does anyone know how to implement complex posting functionality via IDoc?
    We have not found any SAP Notes about this either.
    We are running SAP 4.6c
    Thanks in advance for all kind assistance!
    Regards,
    Bernt Evensen

    In Complex posting, consultants and experts can have their choice of posting by selecting the posting key and do all the entries as long as the doc type - allows account types.
    Only two Tcodes are used by consultants and experts from olden days - F-02 and F-04 - which will take care of most of the transactions. While using the Tcodes , system will take control the settings in PK, GL and display the fields - This will help consults whether the config is OK. In the same screen - the facility of fast entry screen is there - which allows only 40/50 posting keys..- further developed for new screen Enjoy SAP.
    In Enjoy SAP posting screens- you need to create separate variant - for entry - but however  while entering the data and saving - system will decide whether it can be entered or not as per GL - FSGrp definitions. Here you have option to select posting keys only 40/50 at the bottom screen- it is development from the fast line entry screen of complex posting -This screen is meant for users who will do only limited transactions. You have editing option for users for this screen separately to avoid mistakes by users and not asking for more informations. You will be able to move from Enjoy SAP to Complex posting and back while doing the transaction.
    Hope the above explanation will be of help to you.

  • Feature request - disabled auto-select in function editor

    PLEASE add a setting to disable this. It is very annoying.

    Hi Ben,
    There are a few enhancements that could be made to improve the productivity of heavy script builders:
    1) Reinstate the "Advanced Editor" button on the right side of the formula bar. It's tiring having to click the View tab, click the editor button, and then flip back to the view tab to apply and close (or use the pull-down menu on the left). Leave the View
    tab as is - just put the button back as a shortcut to open the editor dialog box. Thanks!
    2) When you create a custom function, the function tab appears...which means that PQ knows that it's working with a function. It would be useful if, in addition to creating the function tab, PQ unchecks the load to workbook check box. Loading a
    custom function to the workbook serves no practical purpose. The problem is that I invariably forget to uncheck the box after creating a new custom function, and have to re-enter the function, uncheck the box, then delete the now useless worksheet. Phew!
    3) Would be really nice if there was a window that allowed the input of test function arguments, and displayed the results of intermediate expressions calculated eagerly. Such functionality would be a huge boost for troubleshooting complex custom functions.

  • Help - Oracle function w/RETURN VIEW_NAME%ROWTYPE

    I have a fairly complex Oracle function with a signature like this:
    FUNCTION get_some_data
    in_param_one VARCHAR2
    , in_param_two VARCHAR2
    )RETURN VIEW_NAME%ROWTYPE
    (The internal logic of the function is such that it will return at most one row.)
    I have sample code from MSDN that outlines calling functions in .Net, like this:
    // create the command for the function
    OracleCommand cmd = new OracleCommand();
    cmd.Connection = conn;
    cmd.CommandText = "GET_EMPLOYEE_EMAIL";
    cmd.CommandType = CommandType.StoredProcedure;
    // add the parameters, including the return parameter to retrieve
    // the return value
    cmd.Parameters.Add("p_employee_id", OracleType.Number).Value = 101;
    cmd.Parameters.Add("p_email", OracleType.VarChar, 25).Direction =
    ParameterDirection.ReturnValue;
    // execute the function
    conn.Open();
    cmd.ExecuteNonQuery();
    conn.Close();
    // output the result
    Console.WriteLine("Email address is: " + cmd.Parameters["p_email"].Value);
    I don't see an available OracleType to fit the '...%ROWTYPE' return value.
    I think the Oracle code is doing inferred 'table inlining' but it may, instead, be using an inferred refcursor (clearly I'm no DBA). Everything I've been able to find online when googling for how to handle this in .Net doesn't seem to match this situation.
    How can I call this function and get the data back in C#? Please note that I don't have the authority to modify the package to make it explicitly return a refcursor.
    Thank you for any light you can shed!
    MarFarMa

    Here's a "quick and dirty" example using the HR sample schema that I think might be enough to get you going...
    Pl/SQL (used to mimic your function that returns %rowtype):
    create or replace function get_country_row (p_id in varchar2) return countries%rowtype as
      cursor emp_cur is select * from countries where country_id = p_id;
      emp_rec emp_cur%rowtype;
    begin
      open emp_cur;
      fetch emp_cur into emp_rec;
      close emp_cur;
      return emp_rec;
    end;C# Code:
    using System;
    using System.Data;
    using System.Text;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace RowTypeTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          // create and open connection
          string constr = "User Id=hr; Password=hr; Data Source=oranet; Pooling=false";
          OracleConnection con = new OracleConnection(constr);
          con.Open();
          // build anonymous pl/sql block to get the data
          StringBuilder sbSQL = new StringBuilder();
          sbSQL.Append("declare ");
          sbSQL.Append("  l_country_row countries%rowtype; ");
          sbSQL.Append("begin ");
          sbSQL.Append("  l_country_row   := get_country_row(:p_id); ");
          sbSQL.Append("  :p_country_id   := l_country_row.country_id; ");
          sbSQL.Append("  :p_country_name := l_country_row.country_name; ");
          sbSQL.Append("  :p_region_id    := l_country_row.region_id; ");
          sbSQL.Append("end;");
          // input parameter for country id
          OracleParameter p_id = new OracleParameter();
          p_id.OracleDbType = OracleDbType.Varchar2;
          p_id.Size = 2;
          p_id.Value = "UK";
          p_id.Direction = ParameterDirection.Input;
          // input/output parameter for country id
          // this is redundant but we are selecting * from the table...
          OracleParameter p_country_id = new OracleParameter();
          p_country_id.OracleDbType = OracleDbType.Varchar2;
          p_country_id.Size = 2;
          p_country_id.Direction = ParameterDirection.InputOutput;
          // input/output parameter for country name
          OracleParameter p_country_name = new OracleParameter();
          p_country_name.OracleDbType = OracleDbType.Varchar2;
          p_country_name.Size = 40;
          p_country_name.Direction = ParameterDirection.InputOutput;
          // input/output parameter for region id
          OracleParameter p_region_id = new OracleParameter();
          p_region_id.OracleDbType = OracleDbType.Decimal;
          p_region_id.Direction = ParameterDirection.InputOutput;
          // create command object
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = sbSQL.ToString();
          // add parameters to command
          cmd.Parameters.Add(p_id);
          cmd.Parameters.Add(p_country_id);
          cmd.Parameters.Add(p_country_name);
          cmd.Parameters.Add(p_region_id);
          // get the data
          cmd.ExecuteNonQuery();
          // display data retrieved
          Console.WriteLine("{0}, {1}, {2}", p_country_id.Value, p_country_name.Value, p_region_id.Value);
          // clean up objects
          p_region_id.Dispose();
          p_country_name.Dispose();
          p_country_id.Dispose();
          p_id.Dispose();
          cmd.Dispose();
          con.Dispose();
    }Output:
    UK, United Kingdom, 1This only works if the stored function returns a single row and obviously has no error handling, etc. but I hope it helps a bit...
    - Mark

Maybe you are looking for

  • Any Ideas for speeding up Macbook Pro?

    My Mac has been acting really slow lately. I have had to get it wiped once already because it was stuck on the grey screen at boot. I know now that I can fix this with safe mode, but I have also been having some big issues using the mac itself. I occ

  • Table Control Icon appearing  in Personal Data in ESS in Portal

    Hello All, We are on SAP Enterprise Portal 6.0 SPS09 with version details as J2EE Engine 6.40 PatchLevel 87289.311 Portal 6.0.9.0.0 After installation of Portal system we installed Business Package for Employee Self-Service 4.6C - 4.7 on our Portal s

  • Returning control from your program to command window

    When I run my program using - java testIt take contol of the command window and the prompt doesn't reappear untill I close the program (it has a gui), does anyone know any way I can run my program and keep the prompt on the screen? Thanks.

  • Songs duplicated on Apple TV

    Some albums on my Apple TV show (and play) the same songs 2, 3 or even 4 times. My iTunes is fine. Any ideas about what's causing this and what to do about it. It seems to be getting worse!

  • Add Order Quantity to Pick List PLD

    Can someone tell me how to add the Sales Order Quantity to the Pick List PLD.  I tried adding a database field with PKL1-OrderEntry and then adding another with RDR1-Quantity and then relating that to the former with no luck.  Any ideas from the PLD