Array functions on non-double numbers

Hey everyone,
Sorry for another newbie question, coming from Labview has spoiled me  Is there a way to use the Array Operations functions on float numbers?  If not, can anyone recommend a Boost like library that is C based that will handle floats?
Thanks,
Austin

I suppose you are referring to array functions from the Analysis library: unfrtunately those functions are limited to treat doubles only. I don't know of any alternative for floats or doubles: for the simpler of them you may want to create your own equivalent in a for loop; for more complex functions you can create a temporary array of doubles and use ConvertArrayType function to exchange data to and from it before and after calling the array function.
Depending on other functions you are using into your application, you can consider promotinig all of your arrays to double and use them: PC are now plenty of memory to use and very fast CPU frequency so it could be a feasible solution.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • I bought Numbers because my Excel files would not work with Mavericks. How can I import a non-functioning Excel file into numbers? (As of now, the file NAME transfers but data is not.) but

    I bought Numbers because my Excel files would not work with Mavericks. How can I import a non-functioning Excel file into numbers? (As of now, the file NAME transfers but data does not.)

    HI Dave,
    I'm surprised you get no message when you attempt opening the Excel document in Numbers.
    I'm assuming Numbers 3.1, since you are running Mavericks.
    Does the Numbers file that opens show any content?
    Does it contain a table?
    How large?
    Does it contain more than one tab (indicating more than one sheet)?
    Do those other tabs contain a table?
    Have you checked those tables for data content?
    There have been cases in the past of imported documents opening with white text on a white background, giving the appearance of containing nothing. Check for this by selecting a block of cells, then applying a Fill colour or a Text colour using the Format button (paintbrush).
    I'd also suggest attempting to open the Excel files using LibreOffice, which can be downloaded from the linked website.
    Regards,
    Barry

  • How can I perform the LINEST function using the new version of Numbers? The old method of using "command enter" to complete the array function does not work. Please help ASAP!!!

    LINEST function using Numbers for Mac

    Thank you for your help. This page is somewhat helpful, but I still don't quite understand.  I am using the Numbers program, and my assignment calls for me to use the LINEST function to return a set of 10 values. 
    When I googled how to do this, a lot of pages mentioned hitting "command+enter" to complete the array function, but they were using an older version of Numbers and it doesn't do anything when I try it in the new version.  I tried using "Index" with LINEST, and i've managed to get about 5 values out of it.

  • Which functions and features in Numbers are NOT exported correctly to Excel?

    I wish to know EXACTLY which functions I use in a Numbers sheet WILL FAIL to export correctly to an Excel or Neoffice spreadsheet.
    For instance, I created a Numbers spreadsheet using prolific use of the IFERROR function. However, when I EXPORT to XLS, all the cells that used the IFERROR function were replaced by the literal value of the cell. My IFERROR formulae were not EXPORTED as I had expected.
    I note that some formulae were converted correctly in my EXPORTED spreadsheet: eg MAX, MIN, AVERAGE.
    I understand that IFERROR was a function introduced recently to Excel, ie in the 2007 version. Consequently, I suspect that Numbers exports to a pre-2007 version of Excel. If so, which version?
    I have found this list that shows which functions are compatable amongst various versions of Excel:
    Excel Functions: Compatibility Reference (2010, 2007 & 2003). (n.d.). Retrieved from https://docs.google.com/spreadsheet/ccc?key=0AsHau4_IeCfwdG45c0VhcjBBUGNreVo2ZzN NRU1BT0E#gid=0
    This list shows that, for instance, IFERROR exisits inb both Excel 2007 and Numbers-09. So why is IFERROR not exported?
    Curmi, J. (n.d.). Summary of function in excel and numbers-09. Retrieved from http://curmi.com/blog/wp-content/uploads/2009/01/functions-in-excel-and-numbers- 09.pdf
    Some examples of my use of ISERROR in Numbers are as follows:
    =IFERROR(RANK(C47,$C47:$J47,1),"")
    =IFERROR(MEDIAN(C51:C58),"")
    =IFERROR($C32-C88+1,"")
    I use the above function to  carry out the calculation ONLY IF  a cell is non-blank and contains a number.
    More questions
    What are the rules that Numbers uses to convert to Excel?
    Is Numbers converting to the 2003 version of Excel? ... or an earlier version? ... which version?
    Why desn't Numbers advise me there were conversion errors or simplifications made?
    eg: "Cell A33 Function IFERROR was exported to the cell value for Excel"
    Is there a preference that I can select which version of Excel that Numbers will export to?
    In the meantime, I must abandon Numbers and use NeoOffice!

    Thanks,
    I applied your suggested ISERROR transformation to examples such as:
    =IFERROR(RANK(C47,$C47:$J47,1),"")
    =IFERROR(MEDIAN(C51:C58),"")
    =IFERROR($C32-C88+1,"")
    However, a caution for young players....
    Certainly, the ISERROR function exports to .xls. However, it behaves differently in NeoOffice.
    Items 1 and 2 function identically in the case of say, ranking a row in which some cells are blanks.
    Item 3, when translated using ISERROR to =IF(ISERROR(C32-C88+1),"", C32-C88+1), results in "" (ie error is raised) in Numbers but yields figure 0 in NeoOffice when there is a blank in either of the cells.
    I  recall from programming school in the mid-1970s that using GOTO statements and On Error branch statements were not admissible as routine programming steps. In fact, we received an automatic fail grade if we used a GOTO or GOTO like construction. So, I have found a more programmatically elegant way to solve my problem: eg:
    =IF(C88="","",C32-C88+1)
    Curiously, earlier I found/suspect this does not work equivalently in Numbers and NeoOffice:
    =IF(ISBLANK(C88),"",C32-C88+1)
    When you try using ISBLANK you always get an intuitively unexpected result because ISBLANK ONLY gives TRUE when there is absolutely nothing in a cell. A Formula reference in the cell, even if the function result yields "", gives FALSE... because, according to the definition of ISBLANK the cell contains a formula.
    As I tell my students, ALWAYS lookup the HELP on any function you use. ALWAYS test the function to see how it performs!.... and lesson 3: Always test your spreadsheet on different systems.... then hope!
    FYI:
    Here's a  link to my Spreadsheet (Neoffice .xls) and a video explaining its use.
    Team Contribution: Introduction (Prototype). (2013). Retrieved from http://www.youtube.com/watch?v=bj87FGLoplk&feature=youtube_gdata_player 
    I don't guaranteee this link for ever! ... and I continue to "tweak" it
    https://www.dropbox.com/s/1jz7gzksejnbqo1/Team%20Contribution.xls

  • TS2755 My wife and I both have iPhone 5s, I can't send text messages to non iPhone people that I use to but iPhone people I can, My wife can send text to non iPhone numbers.  I have checked and we both have the same settings.

    My wife and I both have iPhone 5s, I can't send text messages to non iPhone people that I use to but iPhone people I can, My wife can send text to non iPhone numbers.  I have checked and we both have the same settings.  Both of our phones are up to date 7.0.4.

    The ability to see and send calendar invites is a function of the calendar you are subscribing to and who owns it. We need more information, like what calendar are you subscribing to? MS Exchange? Google? Mobile Me?

  • CSE/Array Functions

    Many of my spreadsheets rely on the array functions, sometimes referred to as CSE (Control-Shift-Enter) functions in Excel. A good example from one of my sheets would be:
    AVERAGE(IF(B2:B25=$F$3,H2:H25))
    Somewhat like an AVERAGEIF function if you will...
    I was quite disheartened to see all of my CSE functions not properly performing when opened in Numbers. Does anyone know of an alternate command in Numbers to get these to work? Or are CSE functions not supported at all?

    the java.util.Array and infact the Collections classes are only available since jdk1.2
    Browsers have built-in support only for jdk1.1 To use Java 2 classes in applets, the target machine must have the JRE plugin. You will also need to run your html file through HTMLConverter. This will direct the browser to use the plugin. Also, if the user does not have the plugin, it will prompt him to download it.

  • Problem with the  addition of  double numbers

    when we try to add the two double numbers say,
    119.52, 10.00
    here we should get 129.52
    but it is giving as 129.51999999999998
    This is happening only for sum numbers.
    Here i want to round this to two digits after decimal point
    if i round the above value i will get 129.52 and the problem will be solved.
    But we don't know exactly on what basis we are getting the sum as 129.51999999999998.
    Assume that, tomorrow when we are adding some other numbers we may got like
    129.51444444444448
    when we round this we get 129.51
    but actually we have to get 129.52.
    If anyone know why the system is giving that wrong sum , please give solution to avoid this.
    In My application , i want the exact sum amount so if i add some numbers i should get exact sum.
    like 119.52+10=129.52
    i want exactly this. How to get this.

    As another poster said, this is a topic worth reading up on, as there are subtleties involved in this kind of imprecise math. A couple of points to get you started though...
    * Java's double type has a precision of something like 16 (20? 24?) decimal places. (You should be able to find the correct number in the lang. spec., or someone may be kind enough to post it here.) I don't remember the formal definition, but what this means, approximately, is that any number that can be represented will be accurate to within +/-0.5*10^-16 of its value. That is, if the actual value is 2e5, then the absolute value of the error in the representation will be less than 0.5e-11. (I might be off be a factor of 2 and/or an order of magnitude here, but you get the general idea.) The good news is, no value will be in error by more than that amount. The bad news is, any value could be in error by up to that amount. These are the two key points.
    * Compare the precision implicit in your data and needed in your results to that of Java, along with the number of intermediate calculations you'll do to get a final result. For instance, if you're doing financial calcs in the tens of billions of dollars, and you need accuracy to the penny, that's one part in 10^-12. Assuming any given value is off by no more than one part in 10^-16, and assuming all errors are in the same direction, if you do 10^4 cumulative additions, you'll be off by a penny. Again, these are rough, and I may have missed something, but this is the kind of thing to look at to determine how the inherent imprecision will affect you.
    * Don't round any intermediate results. Keep the precision you have. However, when you're comparing (as jschell demonstrated) make a copy of the value and round that copy before doing the comparison. Use the first two points above to determine whether that rounding will meet your needs for precision. Same goes for displaying.
    * Finally, if the 10^-16 (or whatever it was) precision of a double is not sufficient, you can get arbitrary precision with BigDecimal. There are a couple of caveats, however. 1) It's a lot slower than using primitives ans 2) Arbitrary precision does not mean infinite precision. You can specify as many decimal places as you want (subject to time and memory constraints), but you even if you specify 1,000 decimal places, you can still be off by 5 in the 1001st place.

  • Is there any way to create a circular buffer using the INSERT ARRAY function?

    I saw the example using the REPLACE ARRAY function, but it uses too much CPU power on my laptop. I'm using it for a very sensitive application and saw that the INSERT ARRAY function used much less CPU power.
    I am also not wiring the index on the INSERT ARRAY function so that whatever is read from the buffer is added to the array.
    However, since it is not indexed, I don't know how to set the "write" index back to 0 when it reaches a certain sized array (ie 1000 elements). I was looking for an array property node, but couldn't figure out if one exists for the "current write index".
    Can anyone help?
    Thanks

    I will try to answer this question to my best understanding. I apologize if I interpreted the question wrong.
    You are using the "Insert Array" vi without wiring the index. By doing that, new elements will be added (appended) to the array.
    If you just want to know the current index to stop your acquisition when the array reach certain amount of elements, then you can use the "Array Size" vi to keep track of the size of the growing array. Remember that Array Size = last index + 1 because the index start at zero.
    A second option is that you may want to start over the array when it hits the maximum number of elements that you will allow. If that's the case, then you may want to re-initialize the array to a NULL state by stablishing a condition (for example, when the
    size of the array is 1000, re-initialize). I provided an example attached to this message showing how this can be accomplished. In the example, an 1D array grows in size using the "Insert Array" vi and inserting a random number. When the array reach 4 elements, it is re-initialized. You can expand this example by saving the array first to a file or some other holder before re-initializing the array. The example is in LabVIEW 6.
    Finally, if you want to replace the current values with new values, I think you do not have other choice but to use the "Replace Array" vi.
    Hope this can be of help.
    Regards;
    Enrique Vargas
    www.vartortech.com
    Attachments:
    array_example.vi ‏20 KB

  • How to change the elements number in Number To Boolean Array Function VI

    Hi, I'm working on using the DAQ digital output to control the digital input of a DAC, and I used the Number To Boolean Array Function. VI to convert the number to a Boolean array. The maximum number should be 4096, therefore it should consist of 12 elements.
    For the description of the VI, it says Boolean array returns an array of 8, 16, 32, or 64 elements, depending on the number of bits in the integer. Therefore, I change the number of the channels in task to 16, but it still doesn't work. Any suggesitions are greatly appreciated.
    Thanks!
    Possible reason(s):
    Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
    When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.
    Number of Channels in Task: 12
    Number of Channels in Data: 32
    Task Name: _unnamedTask<1B>
    Solved!
    Go to Solution.
    Attachments:
    DAC test.vi ‏47 KB

    Once you have the boolean array, you can resize it using array tools. For example you can use "reshape array" with a lenght of 12 to trim the array to 12 booleans elements (you can also use array subset).
    LabVIEW Champion . Do more with less code and in less time .

  • Unexpected behavior of spreadsheet string to array function

    Hello,
    I found some weirdness in LabVIEW 2011 that I do not understand. In the attached vi, I provide a one-dimensional spreadsheet string separated by spaces. I use the spreadsheet string to array function to convert this spreadsheet string into an array of strings.
    I ran into problems when I wanted to specify a space character as the delimiter.
    The conversion works as intended, if I do not specify a delimiter (i.e., the default tab delimiter is used). But if I specify the delimiter, only the first element of the spreadsheet string is converted. I do not understand this behavior.
    Thanks for your help.
    Peter
    Solved!
    Go to Solution.
    Attachments:
    Test spreadsheet string to array.vi ‏9 KB

    You don't have spaces in your string. You have tabs and of course the default delimiter works. Right click and select '\' Codes Display and see the \t.

  • How to avoid Build Array function inside a For (while) Loop?

    Hi there,
    I have a simple question about how to avoid using Build Array function inside the loop. Now I want to remove the Build Array funtion inside the loop to improve the performance (To get better memory management). Any idea how to do that?
    Thanks a lot!
    Warmest regards,
    Chong

    It's been my experience that using the auto-indexing to build an array
    on a For loop is just as good as initializing and replacing elements.
    The For loop knows before it runs how many iterations it has to run and
    can allocate the array ahead of time.
    You're better off initializing and replacing when using a While loop
    because it does not know how many iterations it will run and can't
    pre-allocate the array ahead of time.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • UK non geographic numbers

    Hi,
    Is there a list of charges to UK non geographic numbers e.g. 0844 0845 0871 ?
    many thanks

    If you want them all displaying in the meeting invite, you'll have to add all of the numbers to the same region as Barry suggested.  However, if you do this, you won't see any location information associated with them (this is for the UK, this is for
    DE).  Perhaps that won't matter too much because people will see their country codes and recognize that, otherwise you have two options here. 
    1) Create different regions and hope people click the "Find a local number" link in the meeting invite.
    2) Put them all into a single region but change the display name to include the country name.  The issue with this is that the number becomes un-clickable from Lync.
    Past that you're manually editing each meeting request.  No perfect option I've found here.
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications

  • Question regarding functional​ity of "Sear​ch 1D Array Function&q​uot; in TCP/IP context

    In the attached tcp_Registry.vi, the vi uses the "Search 1D Array Function".  I can't figure out why this function can't find the index of the input element, since the inputs to the function match...
    Solved!
    Go to Solution.
    Attachments:
    tcpInstrument.llb ‏238 KB
    tcp_registry_error_2Jun09.zip ‏435 KB

    I was a bit surprised this morning by the fact that the Initialize vi worked, so I decided, "What the heck?" I'll try the "LCLSA Wave Save To File.vi" again, as I haven't been able to get this one working without errors for the past few months.  And, magically, it worked!  I didn't believe it, so I ran it again - and it worked again!  I still didn't think this was true, so I ran a slightly modified vi I made, "LCLSA Wave Save To File_looped.vi", which just repeats the vi for multiple iterations to create multiple data files.  And this worked, too!  I have NO idea why today everything seems to be fine - I've seriously had issues with the stuff for at least 3 months.  However, I'm just going to go with the flow and see if I can now implement this stuff in my own application now and will let you know how that goes.
    A quick question - do you have any suggestions as to how to view the data files properly?  I believe they come out as binary, but look like mumbo-jumbo when viewed in a text editor like WordPad.  Thanks!
    Attachments:
    3Jun09 Files.zip ‏2 KB

  • Batch rename files that have non consecutive numbers?

    I have a folder with about 100 image files that have non consecutive numbers. Is there a way to rename them all to add something after the numbers (and before file type extension) without changing the numbers?
    Example: If I select 111019.003.dng and 111019.007.dng, is there a way to batch rename to 111019.003_tk.dng and 111019.007_tk.dng?
    Of course, simply batch renaming w/ a sequence number would change them to 111019.003_tk.dng and 111019.004_tk.dng. Which is no good.
    I realize the easiest way around this is to name them correctly the first time, but I am not the photographer.
    Hope this makes sense, and thanks.

    You can bulk rename in Bridge IE:-

  • Any RunningApplications-like function for non-windowed processes?

    Am I missing any RunningApplications-like function for non-windowed processes like Unix executables? To start with I'd settle for processes in user-space but would ultimately like to list processes like Activity Monitor does. Even comparing RunningApplications results to user space Activity Monitor results will show the difference.
    As far as I can tell you need to go all the way down to kauth and kernel space to watch for non-windowed processes being launched. Is there somethig in-between I'm missing? A notification device about launching apps would be perfect if it cover all processes.
    Thanks,
    =Tod

    I think kqueue may be able to do what you want. Look at the EVFILT_PROC filter. You may have to watch a number of processes - perhaps all of them. But that would tell you any time you get a fork and whenever a process is reaped.
    I looked at kqueue at it does what I want but you need to register it on a by process/file basis which is great for a very specific set of things but not for overall system watching. (I also looked at fsevents but it is designed as a post-event notification system.) While NSWorkspace has the usual Cocoa model notifcation willlaunchApp, didlaunchApp, etc it seems that you need to get the kernel to watch the launch lifecycle of non-windowed functions.
    I actually did manage to get a comprehensive list of running apps out of parsing sysctl output with much less trouble than I expected. So far I have managed to get the pid, uid and abbreviated processname and the list seems to match the Activity Monitor list - at least at this testing printf stage. Getting the username from uid should be trivial and the full file name is doable it just requires some struct length and offset math. I'd like the launch path information but I can live without it for monitoring purposes if I can't figure out how to get it.
    This means that the monitoring part of the running system seems relatively straight forward - wrapping the call in an NSTimer and watching for changes in the returned results. But the watching of the actual starting and stopping of all processes remains some deeper work.
    Thanks for all the suggestions,
    =Tod

Maybe you are looking for