Perform math functions on arrays

Hello,
How do I go about dividing each element of my 1D array by 1000???
Thanks for your help and time.
hiNi

Hi hiNI,
do show a picture for Altenbach's comment:
Have you ever gone through the free online courses offered by NI here? They also explain, how to work with arrays...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Performing math on Decode function tags and moving averages

    I have a query shown below to create columns for my report. Can I use the field names as shown in bold to perform math functions? Is there an easy way to do this?
    select Data_date,
    SUM(DECODE(tag_id,'SEF_F0348I',avg_value,NULL))"TE_Flow_mgd",
    SUM(DECODE(tag_id,'L_STEbod_con',avg_value,NULL))"TE_BOD_mgl",
    "TE_FLOW_mgd" * "TE_BOD_mgl" * 8.34*.45359 as "KG_BOD"FROM daily_tag_data
    Where data_date >= to_date('12/31/2002','mm/dd/yyyy')
    GROUP BY data_date;
    Also how would I perform a seven day moving average on "KG_BOD"
    Thanks - Very new at this.

    If you want avoid a sub-query, try this...
    select Data_date,
    SUM(DECODE(tag_id,'SEF_F0348I',avg_value,NULL))"TE_Flow_mgd",
    SUM(DECODE(tag_id,'L_STEbod_con',avg_value,NULL))"TE_BOD_mgl",
    SUM(DECODE(tag_id,'SEF_F0348I',avg_value,NULL)) * SUM(DECODE(tag_id,'L_STEbod_con',avg_value,NULL)) * 8.34*.45359 "KG_BOD"
    FROM daily_tag_data
    Where data_date >= to_date('12/31/2002','mm/dd/yyyy')
    GROUP BY data_date;
    just replace the 'column-alias' with the actual arithmetic fuction...

  • Math Functions in SAP

    What are the math functions in SAP?

    Hi,
    This is what u want may be
    Mathematical Functions
    ABAP contains a range of built-in functions that you can use as mathematical expressions, or as part of a mathematical expression:
    [COMPUTE] <n> = <func>( <m> ).
    The blanks between the parentheses and the argument <m> are obligatory. The result of calling the function <func> with the argument <m> is assigned to <n>.
    Functions for all Numeric Data Types
    The following built-in functions work with all three numeric data types (F, I, and P) as arguments.
    Functions for all numeric data types
    Function
    Result
    ABS
    Absolute value of argument.
    SIGN
    Sign of argument:                      1 X > 0
                                                  SIGN( X) = 0 if X = 0
                                                                   -1 X < 0
    CEIL
    Smallest integer value not smaller than the argument.
    FLOOR
    Largest integer value not larger than the argument.
    TRUNC
    Integer part of argument.
    FRAC
    Fraction part of argument.
    The argument of these functions does not have to be a numeric data type. If you choose another type, it is converted to a numeric type. For performance reasons, however, you should use the correct type whenever possible. The functions itself do not have a data type of their own. They do not change the numerical precision of a numerical operation.
    DATA N TYPE P DECIMALS 2.
    DATA M TYPE P DECIMALS 2 VALUE '-5.55'.
    N = ABS( M ).   WRITE:   'ABS:  ', N.
    N = SIGN( M ).  WRITE: / 'SIGN: ', N.
    N = CEIL( M ).  WRITE: / 'CEIL: ', N.
    N = FLOOR( M ). WRITE: / 'FLOOR:', N.
    N = TRUNC( M ). WRITE: / 'TRUNC:', N.
    N = FRAC( M ).  WRITE: / 'FRAC: ', N.
    The output appears as follows:
    ABS:              5.55
    SIGN:             1.00-
    CEIL:             5.00-
    FLOOR:            6.00-
    TRUNC:            5.00-
    FRAC:             0.55-
    DATA: T1(10),
    T2(10) VALUE '-100'.
    T1 = ABS( T2 ).
    WRITE T1.
    This produces the following output:
    100
    Two conversions are performed. First, the contents of field T2 (type C) are converted to type P. Then the system processes the ABS function using the results of the conversion. Then, during the assignment to the type C field T1, the result of the function is converted back to type C.
    Floating-Point Functions
    The following built-in functions work with floating point numbers (data type F) as an argument.
    Functions for floating point data types
    Function
    Meaning
    ACOS, ASIN, ATAN; COS, SIN, TAN
    Trigonometric functions.
    COSH, SINH, TANH
    Hyperbolic functions.
    EXP
    Exponential function with base e (e=2.7182818285).
    LOG
    Natural logarithm with base e.
    LOG10
    Logarithm with base 10.
    SQRT
    Square root.
    For all functions, the normal mathematical constraints apply (for example, square root is only possible for positive numbers). If you fail to observe them, a runtime error occurs.
    The argument of these functions does not have to be a floating point field. If you choose another type, it is converted to type F. The functions themselves have the data type F. This can change the numerical precision of a numerical operation.
    Regards

  • Math functions not sure how to work with them

    Im trying to work out the math functions into my program, but I'm not sure where is the mistake. This is what I have now:
    (a) y = ax^2 + bc + c
    (b) y = a*sin(x) + b*cos(x) + cx);Especially I'm not sure how to format the sin and cos functions
    Thanks !

    jordan755 wrote:
    Im trying to work out the math functions into my program, but I'm not sure where is the mistake. This is what I have now:
    (a) y = ax^2 + bc + c
    (b) y = a*sin(x) + b*cos(x) + cx);
    Java != algebra.
    (a) says: Take the variable called 'ax', perform a bitwise XOR on its value with the number 2, add that result to the value of the variable 'bc', add that result to the variable 'c' and put the result in variable 'y'.
    (b) is trying to call sin() and cos() methods defined in the current class and add the to variable cx.
    In your other thread, you had variable names 'keyboard' and 'character'. Given that, why would you expect 'bc' to mean "b times c" rather than "variable named 'bc'"? If you want multiplication, you have to use the multiply operator, ***.
    If you want to call a method that's defined outside your current class, you have to use the class name or a reference to an object of that class. The methods sin and cos are defined in the Math class. I advise you to read their docs before using them.

  • Up/Down Arrow keys do not perform their function on SOME websites or at SOME times, on other websites and at other times these keys work fine, updated firefox, restarted computer. turned off cursor key option in Advanced tab, using autoscrolling option.

    Up/Down Arrow keys do not perform their function on SOME websites or at SOME times, on other websites and at other times these keys work fine, updated firefox, restarted computer. turned off cursor key option in Advanced tab, using autoscrolling option.

    You may have switched on [http://kb.mozillazine.org/accessibility.browsewithcaret caret browsing].
    You can press press F7 (on Mac: fn + F7) to toggle caret browsing on/off.
    See http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    * Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"

  • How can I create a button that performs the function of a keyboard shortcut, specifically print scrn

    I need my presentation users to take a screen shot of a slide within my presentation.  I know that windows 8 has a new function that allows a screen shot to be taken and saved directly to the user's computer and I need a button that can be placed on a slide and perform this function.  The shortcut is (windows key) + (print scrn).  I want to save my userss some time and just have a button perform this task.  Any idea on how I can make this possible? I am using Captivate 7.

    I think Ajit may have misunderstood your need.  The command he told you about triggers the Print command to allow you to print the currently active slide (on a laser or inkjet printer). This does not have the same result as you would get by hitting the PrintScreen button on your keyboard (to take a screencapture and have it saved to the Clipboard for pasting somewhere else).
    You can add a button to your slide and set the PrintScreen key as the shortcut, but this will NOT mean that clicking the button will cause a screencapture to be taken.
    There are JavaScript libraries that will allow you to execute JavaScript code in a Captivate project that can take a screen capture:
    https://github.com/ariya/phantomjs/wiki/Screen-Capture
    However, to implement these solutions you would need to be quite knowledgeable with setting up JavaScript.  It's not for newbies.

  • I'm new to Ipad 2.  I can bring up a website, but I can't make it active; i.e., log onto it and perform any functions within in.  Help!!

    I'm new to Ipad 2.  I can bring up a website, but I can't make it active; i.e., perform any functions within the website.  I cannot make the screen move -- nothing.  Help!!

    Can you navigate http://www.apple.com ?
    Without knowing your credit union's web site it is hard to tell what the problem is.
    Note that sites that use Flash will have problems as it is not supported.

  • Using advanced math functions in plugins

    I have an application built in LabVIEW 8.5 that calls external VIs as PlugIns. Normally adding any subVIs of these PlugIns in the same directory as the plugin is located in (or a sub-directory of that) will enable the plugin to execute (I have several such plugins that do run properly).
    The problem now however is that one of these PlugIns use a few math functions (linear fit etc.) and, although all the subVIs and dlls (including the ones from the vi.lib etc.) are located in the same directory - and the application is run on a machine that actually has the full professional LV 8.5 installed on it, it is still not executable (I've built a source distribution to get all the code it depends on out, with no exclusions). If I hit the broken run-button it says the full development system is required to resolve the issue.
    The same plugin works fine in LV 7.1.1 (although then it is distributed as a top level VI in an llb with the support-VIs in it instead).
    Is there still a way in LV 8.5 to distribute a plugin that uses the math functions without having to include the functions in the built application that will launch the plugin?
    MTO

    Hi, Mads,
    My "Quick and Dirty" test shows that it should be no any problems. Just deselect "Exclude vi.lib" Vis in the Distribution, and select that dependecies should be deployed with PlugIn. See attachment, hopefully its will be helpful for you. Such distribution way produced huge llb (because not only linear fit embedded into library, but all math library), but at least it works.
    best regards,
    Andrey.
    Attachments:
    PlugInWithMathDistributionTest.zip ‏21 KB

  • I cannot perform any function such as opening emails in my hotmail

    I'm able to sign in, although my sign in screen looks totally different now. I am unable to perform any function once I've signed in.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • How to invoke math functions from dbx?

    Is there an easy way to invoke math functions from dbx? If I try, for example, to call sqrt I get meaningless results:
    (dbx) print sqrt(4.0)
    sqrt(4) = 1074790400
    (dbx)
    This is from code which uses sqrt, so sqrt should be accessible. Does this need some kind of cast?

    It turns out that this is a bit different than it looks: dbx is indeed able to invoke functions invoked in this way correctly; dbx just fails to print a sensible return value.
    I tried with the following small function:
    #include <stdio.h>
    int printme(double x) {
    printf("This is %g\n",x);
    return (int)2*x;
    Compiling this without -g, linking this with some hello world program and invoking the function from dbx gives
    (dbx) print ((int (*)(double))printme)(4.0)
    This is 4
    ((int (*)(double)) printme)(4) = &(noname)(double) at 0x8
    (dbx)
    The line "This is 4" clearly indicates that the function has been invoked correctly. Just the printed return value is meaningless. In this case, it is even possible to construct expressions with the return value:
    (dbx) print 5 + ((int (*)(double))printme)(4.0)
    This is 4
    5+((int (*)(double)) printme)(4) = 13
    i.e. dbx "knows" the correct return value 8. This does, however, apparently not work with return values of type double (i.e. in the original sqrt-Example).
    I have therefore submitted a bug report with bugs.sun.com; I will post the BugID when (and if) this has been accepted.

  • Is it possible to perform doDML functionality in ViewObject

    Hello,
    In Oracle Forms to ADF conversion, different forms is sharing same entity object. As a result,
    different pre-Insert, Pre-update, etc. is requied.
    Is is possible to perform doDML() functionality in ViewObject instead of the Entity Object?
    Thanks

    No, but what you could do is create a transient attribute in the EO, of which each VO sets a different value. Thus when the doDML method is called, it could check the value of the transient attribute, and execute different functionality based on the transient.
    CM.

  • What advantage does HiQ provide over LabView Math Functions

    I'm evaluating how HiQ can help me to solve engineering modeling problems. I have used LabView to write several DAQ programs and a few programs to numerically solve modeling and simulation problems. What advantage are there to using HiQ compared to the math functions provided in LabView.

    There aren't really any advantages. There are some visualization options that are available in HiQ that would be very difficult in LabVIEW. HiQ is just another option to use, for a different type of interface and programming than is available in LabVIEW.
    Best Regards,
    Chris Matthews
    National Instruments

  • Advanced math functions/libraries

    Are there any more advanced math functions/libraries available for Java (other than in the normal Math class)? Right now I'm looking for something that will rapidly return all the factors of an integer, but I am likely to be interested in other features in the future as well. Thanks.

    Kramis wrote:
    Are there any more advanced math functions/libraries available for Java (other than in the normal Math class)? Right now I'm looking for something that will rapidly return all the factors of an integer, but I am likely to be interested in other features in the future as well. Thanks.Not in the standard classes.
    You could look at the Apache Math library:
    [http://commons.apache.org/math/]
    perhaps it has some number theory methods.
    Or you could look into a Java bridge/interface between existing computer algebra systems (CAS) like Maple, Mathcad (both commercial) or the excellent opensource alternative: Octave. All these CAS have a bridge/interface to Java.

  • "You do not have the correct role to perform this function" on New Site

    I have created a new site where I added fwadmin to all roles. When I login to Admin for this site I get the "You do not have the correct role to perform this function" error. I've read the manual and retired adding the user to all roles. I also looked at the Asset Types and I get "Error in evaluation;Error in configuration" when trying to enable.
    Please point me to where I am going wrong, or where in the manual (and which manual) I can find help.
    Regards,
    John

    Hi John -
    When you're provisioning users for sites, you have to
    1) enable the app for your site
    2) specify the roles that pertain to your app
    3) assign a user to the site
    4) assign a user roles for the site
    If you miss any one of these, you can get this error. When you see "Error in Evaluation; Error in Configuration", however, especially during the out-of-the-box apps, please report a bug to support. That message is basically the XML scripting language equivalent of an uncaught exception, and it should not happen in the UI.
    Regards,
    Tony

  • My MacBook Pro is hanging for very long periods of time whenever I try to perform any functions.

    Hello Collective Wisdom,
    I have a MacBook Pro from mid-2009 and have recently experienced some problems. There's an above-average bootup time, and whenever I try to perform any functions (say, open a browser window, go into Finder, launch an app, try to type a URL, search for anything), the Spinning Ball of Death comes up for about 5-7 minutes before the function resolves.
    I've been able to get into Disk Utility and it suggested I use Command + R at the bootup screen to do a HD Repair, which I did. But the problem is still occuring.
    What do I Do?

    The next time you have the problem, note the exact time: hour, minute, second.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Scroll back in the log to the time you noted above. Select any messages timestamped from then until the end of the episode. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

Maybe you are looking for