Anyone know how to fill an array faster?

Hey everyone,
I created a program which displays an intensity graph, as well as a histogram of the intensity values on a 1024x1024 chip (X-Y dimension). Currently, the program works fine, but the histogram takes FOREVER to complete, and I was wondering if there's a way to increase the speed of this while including all of the 1024x1024=1048576 data points. Thanks!
Solved!
Go to Solution.
Attachments:
Intensity.JPG ‏89 KB

Please attach the actual VI. A code image is pretty useless.
Keep the histogram in a shift register as a 1D array of a sufficient number of elements. In any case, try to autonidex over the 2D array using two stacked FOR loops and built the histogram using the inplace element structure and using the value (Or something derived from it) as index. How many bins do you want? Your values are U16, so using a histogram with 2^16 elements is not out of the question.
Also don't use express VIs and don't update the graph with every iteration of the inner loop. Indicators belong after the FOR loops.
Your current shift registers are useless. You get the same value from the iteration terminal, right?
Why do you reset the histogram at the last iteration of the outer loop, throwing away all data processed until then????
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Anyone know how to output an XML file from ABAP to a non sapgui location?

    I have a program that creates XML and then outputs a file via CALL METHOD cl_gui_frontend_services=>gui_download. But now I want to execute the program in background mode and therefore I need to be able to output that XML to a NON sapgui file location. Current code creates the XML to an internal table which is binary then the gui_download method converts that to output XML. .  Does anyone know how I can change the code to either a) output the XML to an internal table which can be output via, say, a TRANSFER command..or, b) output the created binary table of XML to a NON sapgui file location?
    Excerpts from current code are as follows:
    first the XML is created (to the binary file)
          Creating a ixml factory
      l_ixml = cl_ixml=>create( ).
          Creating the dom object model
      l_document = l_ixml->create_document( ).
          Fill root node with value XML
      l_element_xml  = l_document->create_simple_element(
                  name = 'XML'
                  parent = l_document ).
          Create tag 'HEADER' as child of 'XML'
      l_element_header  = l_document->create_simple_element(
                  name = 'HEADER'
                  parent = l_element_xml  ).
    header information about the file and general data about the fleet follows
      l_value = c_fleet_import.
      l_element_dummy  = l_document->create_simple_element(
                name = 'TYPE'
                value = l_value
                parent = l_element_header ).
    etc.......
    then the xml is connected to the stream factory and rendered
      Creating a stream factory
      l_streamfactory = l_ixml->create_stream_factory( ).
      Connect internal XML table to stream factory
      l_ostream = l_streamfactory->create_ostream_itable( table = l_xml_table ).
      Rendering the document
      l_renderer = l_ixml->create_renderer( ostream  = l_ostream
                                            document = l_document ).
      l_rc = l_renderer->render( ).
      Saving the XML document
      l_xml_size = l_ostream->get_num_written_raw( ).
    and then output to the file
      IF sy-subrc = 0.
        CALL METHOD cl_gui_frontend_services=>gui_download
           EXPORTING
             bin_filesize = l_xml_size
            filename     = 'g:\sapdms\BSCC-DEV\EFPAC XML Files\ALL.xml'
           filename     = '/TRICK/727/OUT/ZEFP/EFPAC.XML' "doesnt work with sap gui
             filetype     = 'BIN'
           CHANGING
             data_tab     = l_xml_table
           EXCEPTIONS
             OTHERS       = 24.
    as implied by the comments the method above will successfully output the XML file to the g:drive but will not output to /TRICK/ location, which is where I need it to go in a background mode run.
    This is a problem which has defeated all our local expertise and I would appreciate any help given... Barry Jones

    Try this code below:
    data  l_xml_table2  type table of xml_line with header line.
    W_filename - This is a Path.
      if w_filename(02) = '
        open dataset w_filename for output in binary mode.
        if sy-subrc = 0.
          l_xml_table2[] = l_xml_table[].
          loop at l_xml_table2.
            transfer l_xml_table2 to w_filename.
          endloop.
        endif.
        close dataset w_filename.
      else.
        call method cl_gui_frontend_services=>gui_download
          exporting
            bin_filesize = l_xml_size
            filename     = w_filename
            filetype     = 'BIN'
          changing
            data_tab     = l_xml_table
          exceptions
            others       = 24.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.

  • Does anyone know how to upgrade from 4.1 to 4.3 ios?

    After being tricked by the fast talking smoothy helper at Apple store in London to buy a micky mouse ipodtouch (fourth generation) two years ago I am stuck at ios 4.1 and find that all the useful applications need 4.3 or more. So I went to the trouble of letting the macbook stay open all night to load yet another micky mouse version of itunes so that I can upload the more recent version of ios and now (since I don't want to continually have a lot of rubbish on the ipod I disabled the automatic sync "feature") I can only go round in circles  whereby the only real possibility left is to turn on the autosync feature. I have had messages like "your ipod will be completely erased if you proceed" and "do you wish to fiddle another few days with this nasty system, then click on continue" and so on.
    Does anyone know how to upgrade from 4.1 to 4.3 ios?
    That would be great (maybe) because otherwise I will toss this children's waste product on the floor and set up my HD camera to show how easy it is to smash the brightly lit screen into pieces and relieve myself of trash which Apple sell to unsuspecting gullible humans who believe that they are not being tricked by such a nice company who produce shiny colourful gadgets which only work for a month or two before becoming 100% obsolete.
    Great to hear from those who have wasted many months of their lives and discovered how to trick the system into doing a simple update operation!
    I am insulted by the tricks that fool many and that apple pretend are "necessary".
    Germany 2014 01 11 16 19 27

    Illaass, your help is amazing - miles better than anyone working in this part of the world who is paid - and you do this for free - because, like me, you LOVE to help people!
    BUT, as I said above -
    1. There is nothing "mobile" under Application Support. For whatever reason.
    2. Devious - that Apple has set up iPod to not show in Finder - a red herring and sign that corruption is visible.
    I will try iFunBox next and it sounds like they provide this for the more serious users but use a trivial name to excuse further strangeness.
    After
    There are purchased items on the iPod that have not been transferred to your iTunes library. You should transfer these items to your iTunes library before updating the iPod. Are you sure you want to continue?
    I get
    Updating to iOS 6.1.5 will backup and restore the apps, media, contacts, notes, and settings on your iPod touch.
    Please do not interrupt the update, which may take an hour or longer to complete.
    Cancel          Update
    And then I wait for hours to arrive at the above mentioned
    Backing up iPod   \\\\\\\\\\\\\\\\\\\\\\\\\ Stop
    and then as above
    An error occurred while backing up this iPod (0xE8000084). Would you like to continue to update this iPod?
    Continuing will result in the loss of all contents on this iPod.
    Cancel                Continue
    and so we are back to where we always land - the user is left in the Apple designed sabotage situation which annoyed me so much initially.
    "Most users will give up at this point, loose all the data or buy yet another disposable from Apple. Less than 3% will work their way to this site and 90% of the 3% will leave the iPod to gather dust in the hope that someone will help later. In all, Apple gains, since people blame themselves for "mistakes" which Apple programmed to throw out users who do not take the 100% Apple path. But Illaass and myself still play the game of "trying to fix" something which Apple don't allow."  was the comment which I was going to write but decided against it, adding no value to the conversation other than explaining one reality which we all hoped could be wrong but which I thought to have a very high chance of being closer to the truth.
    Apologies for my doubts towards the integrity of the creators.
    2014 01 13 12 11 58 17
    Recheck: Under Application Support "mobilesync" folder has appeared (MobileMeSyncClient has also appeared [while again trying to update iPod] with zero size) - Good news, a Backup file is there, but it is only 3GB while my iPod has 32GB and is close to full (800MB free space).
    Latest at
    2014 01 13 12 09 22
    The iPod could not be restored. An unknown error occurred (9).
    More Infomation    OK
    So it looks like I may have lost all the important pictures documenting various items all around Europe for the last two years - luckily I moved a year ago from the iPod toy camera to a Panasonic real camera with SD card which can be read on any computer. Hence important items lost may only be older than one year rather than the most recent items.
    Glad I have changed to Panasonic since they don't try to screw you when you don't use their system.
    I will now check the "more information" rather than just click on "OK" since I am of the 3% who "don't accept cr*p".
    For full information I quote that the iPod now shows a screen with a USB ikon, an upward arrow and an iTunes ikon (all micky mouse language which reduces transparant, clear and technical discussion and thus covers the trail of "where things went wrong").
    The iPod is still attached to the computer but the above MMTALK may mean that the iPod should be attached via USB to the mac. I record much of this activity on Video to be able to later prove EXACTLY what occurred, rather than having to rely on screenshots and opinions. We are after all dealing with important items which may later be required to be shown in court, as evidence against fraudsters.
    The "More Information" link leads to
    Resolve iOS update and restore errors in iTunes
    which I have already seen before.
    I clicked on OK and a help screen (unnamed as ever because no one like myself demanded that the help screens be named for later discussion) arrived:
    You can help Apple improve its products a
    while copying this into this message the computer began to start up Final Cut Pro and this was cancelled, then iTunes came up with a message:
    iTunes has detected an iPod in recovery mode. You must restore this iPod before it can be used with iTunes.
    ok
    And I presume the earlier message about helping Apple is gone because I keep getting interrupted by this message called
    iTunes has detected an iPod in recovery mode. You must restore this iPod before it can be used with iTunes.
    ok
    it has appeared now at least six times interferring with anything else I do. Each time I try to write, this message appears and blocks, but only when I write. I tried to do a carriage return and the message appeared taking the carriage return as acceptance of the OK in the
    iTunes has detected an iPod in recovery mode. You must restore this iPod before it can be used with iTunes.
    ok
    Message. But since I have not removed the USB and keep returning to this message I am able to write for a few seconds (now 30 seconds or more) and the message remains on the screen but not blocking this conversation. It appears to be random but in fact as you can later see from the video, it is not reappearing each periodic number of seconds but as I reach a new comment.
    I will try to close iTunes so that this can be stopped (I clicked on OK and it appeared another few times, each time I clicked on ok and now it has left me in peace to write here although iTunes is still not yet closed).
    Difficult to log down all the strange behaviour but I think you can get the gist of what is going on.
    2014 01 12 12 49 27
    Should I remove the iPod and stop iTunes? I have a nasty feeling turning to indifference since I have video footage which will verify all the above in a court of law if later required. The truth must always win over any devious attempts at forcing people to do things they don't want to ;-)
    2014 01 13 13 03 48

  • Does anyone know how to filter all items in an XMLListCollection?

    I have a tree with the following structure.
    <node>
    <node1>
    <node2>
    <node3 />
    <node4 />
    <node5 />
    </node2>
    </node1>
    </node>
    I need to be able to filter on node 3, 4 and 5 and then after
    the filter if they don't exist get rid of node 2 level and then do
    another filter function to check if node 2 level is there and if
    not.. then filter out node 1 level. Basically this is a bottom up
    filter. In Flas 2.0 I would filter out the base level by deleting
    nodes.. and then run through the next level and check if they had
    any children or not.. if they didn't then I would delete them.. and
    then I would repeat the step for the last level.
    Does anyone know how to do this without having to remove the
    items from the collection.. basically perform a filter rather then
    a delete. I know the filter function only returns the first element
    of the xml struct.. which is annoying. If anyone can help me out I
    would sure appreciate it?
    Thanks

    I guess the filtering on a tree only passes in the root
    nodes... This is hugely lame on Flex's part. I basically had to
    make my own functions to delete the nodes dynamically.
    Remember this only works on an array item which is dynamic.
    delete list
    To make this work I have a main TreeCollection... and from
    that I made a copy. Treecollection.copy() and deletes stuff from
    the copied struct. After the deletions were done I then assigned
    the copy to the MyTree.dataprovider = copy.

  • There is a transparent color over my file in muse whenever I'm editing the file, does anyone know how to remove this?

    Here's a screenshot. I've tried everything to make it go away, including changing the browser fill color, but this just wont change. It does disappear when I preview the site online, though. Does anyone know how to remove this color? Thank you in advance!

    Hi Jessica,
    Please go to View > Click "Hide grid overlay".
    Regards,
    Aish

  • I don't know of there is anyone than can fix this age old Apple problem.   Does anyone know how to retrieve things under an old Apple ID when the email used for that account no longer exists? I am trying to update a number of apps that was bought under an

    I don't know of there is anyone than can fix this age old Apple problem.   Does anyone know how to retrieve apps under an old Apple ID when the email used for that account no longer exists &amp; I can't remember the password? After speaking with Apple Acct. Security, I got the security Q right but my birthday was wrong! They wanted the serial number from my phone that was 3 iPhones ago! Seriously??!!
    Any updated way to work around this? No Apple people can correct it.
    Thanks,
    Joe

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (122986)

  • I no longer have access to my icloud email and don't know the answers to my security questions. Does anyone know how to work around this to reset my icloud ID without losing my info? I haven't backed up in a year because of this.

    I no longer have access to my icloud email and don't know the answers to my security questions. Does anyone know how to work around this to reset my icloud ID without losing my info? I haven't backed up in a year because of this.

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (123381)

  • TS3297 Does anyone know how to reset your security questions?? I loaded an itunes gift card on new ipod but when trying to make a purchase, itunes is asking us the incorrect security questions?!(for 1st time purchase)

    Does anyone know how to reset your security questions?? I loaded an itunes gift card on new ipod but when trying to make a purchase, itunes is asking us the incorrect security questions?! (for 1st time purchase)  I know the questions are not what I chose because I wrote the questions & answers down when setting up the ipod. Any ideas??!!!

    Reset Security Questions
    Frequently asked questions about Apple ID
    Manage My Apple ID
    Or you can email iTunes Support at iTunes Store Support.
    If all else fails:
      1. Go to: Apple Express Lane;
      2. Under Product Categories choose iTunes;
      3. Then choose iTunes Store;
      4. Then choose Account Management;
      5. Now choose iTunes Store Security and answer the bullet questions, then click
          Continue;
      6. Sign in with your Apple ID and press Continue;
      7. Under Contact Options fill out the information and advise iTunes that you would
          like your security/challenge questions reset;
      8. Click Send/Continue.
    You should get a response within 24 hours by email.
    In the event you are unsuccessful then contact AppleCare - Contacting Apple for support and service.
    Another user had success doing the following:
    I got some help from an apple assistant on the phone. It is kind of round about way to get in.
    Here is what he said to do and it is working for me...
      a. on the device that is asking you for the security questions go to "settings", > "store" >
          tap the Apple ID and choose view"Apple ID" and sign in.
      b. Tap on payment information and add a credit/debit card of your preference then select
          "done", in the upper right corner
      c. sign out and back into iTunes on the device by going to "settings"> "store" > tap the
          Apple ID and choose "sign-out" > Tap "sign -in" > "use existing Apple ID" and you
          should be asked to verify your security code for the credit /debit card and NOT the
          security questions.
      d. At this time you can remove the card by going back in to edit the payment info and
          selecting "none" as the card type then saving the changes by selecting "done". You
          should now be able to use your iTunes store credit without answering the security
          questions.
    It's working for me ...I just have to put in my 3 digit security pin from the credit card I am using.
    Good Luck friends!

  • Does anyone know how to get a hold of someone in charge of QA

       Customer support is dire! I have spent long hours dealing with costumers service <whose only modes of help are sending me out to buy something new or provide me with a hyperlink to help page that was two clicks away anyway> Between thier lack of knowledge and SARCASTIC JABS it's amazing that I have retained my sanity. I won't go into details but I'll catch you up. 4 sessions in live chat with LOOOONG delay in between responses and I can not make recovery disc, my phono jack does not function properly, my system can not communicate MTP <you know, what you use to fill your ipod, and I kid you not there is a fan LITERALLY RATTLING AROUND inside my 2 month old notebook. So what do I do? I exhaustively seach for away to get a hold of customer service, and all I can find are blogs about how HP costumer service sucks. Bear in mind that I did not put suck into my search engine. I put "HP QA and HP customer service" into google and what returned was BLOGS ABOUT HOW HP CUSTOMER SERVICE SUCKS. Those were the most relevant results in google. So I finally come to this forum and find a thread about..........you guessed it hp customer service sucking.....but oh no an HP moderator locked it down and provided a link to the page where one can obtain the very customer service that has been deemed insufficient by the very COMMUNITY that it is supposed to support. WE PAYED YOU PEOPLE! YOU ARE HERE FOR US NOT WE FOR YOU.
     Does anyone know how to get a hold of someone in charge of QA
    I will eventually shake the correct bush and flush someone out and I will share my information.......any advice COMMUNITY?

    Hi zach317,
    Thank you for visiting the HP Support Forums.  As stated in the thread you have cited, the purpose of this forum is to give feedback or make suggestions on ways to improve the forums.  Should you have feedback on other issues, please contact HP directly using this link.  This is a user-to-user forum, so you'll have to use this link for direct assistance from HP.
    Many members of the community are extremely knowledgable. If you're having an issue you believe the other users in the community may be able to assist you with, please feel free to find the appropriate forum and post your question there. 
    Should you have any further questions or concerns, you can send a Private Message to me or another moderator or admin at any time.
    Thank you!
    Message Edited by SandyD on 11-22-2008 03:03 AM
    Clicking the "Kudos star" to the left is a great way to say thanks!
    When your problem has been solved, accept the solution by clicking the "Accept as Solution" button to help other members in the future!
    Rules of Participation

  • Does anyone know how to make Pages type in landscape?

    Hi.
    I recently downloaded pages thinking it would be the perfect app to use to take down notes etc whilst at college. But it onlky seems to allow me to type in a portrait mode. I mostly type in landscape cause i find it easier and i can type faster using landscape. I can use "Everynote" app to type in landscape but pages dosnt seem to allow me to even when i try turning my screen. Does anyone know how i can type landscape on pages. If so please comment.
    P.S.
    This is on my Iphone 4 that i am using it on.
    Thanks.
    Arif257

    pages and numbers do not have landscape mode on iphone and ipod.

  • I accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help

    i accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help

    If you mean you accidentally removed the icon for iMovie from the Dock (the array of icons at the bottom of the window), you can add it back easily.
    Open the Applications folder (if you open it from the Dock you may then need to click the Open in Finder icon), locate the iMovie program.
    Drag the icon for iMovie down to the Dock, somewhere between the icon for Finder and the dashed line toward the right.
    Wait for the icons at that spot to move aside, then drop it in.

  • Does anyone know how to achieve this in Photoshop? Any help is appreciated, thanks.

    Hello,
    I'm relatively new to Photoshop so if you know how to do this, please explain by telling me where I click. E.g. File>Open
    Does anyone know how I would achieve this exact effect in Photoshop in the image above (without the circular logo)? The 2 light blue type of effects, one at the top of the image, the one at the bottom of the image. I don't know how to achieve this effect, please show me if you know how. I'm using Photoshop CS5.
    I have looked through hundreds of tutorials, none provide me any clue as to how this is achieved.
    Or does anyone know a tutorial on how this effect is achieved?
    Thank you for your help.

    Yes, it would have been faster and more constructive to point out exactly where to find information rather than scold you.
    Check out the Option bar that one gets under the Menu bar. If it is not showing, go to windows>Options.
    More info: http://helpx.adobe.com/photoshop/using/tools.html#using_the_options_bar
    If you select the brush tool, you will notice a flow value, that you can lower; and a Mode drop down list.
    paint tool options: http://helpx.adobe.com/photoshop/using/painting-tools.html#paint_tool_options
    Set the mode to Linear Dodge, then for the next stroke set it to lighten.
    Blending modes explanations with links about their effects http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-77eba.h tml
    Have fun learning Photoshop!

  • Help!!!!!  anyone know how to change a Double to an int??

    Help!!!!! anyone know how to change a Double to an int?? for use in an array[int].

    I don't know why would you want to depend on a double value to build your array but programmatically just use plain old cast: i = (int) double_value;
    Keep in mind though, the integer value will be truncated.

  • Hello - Does anyone know how I can color the middle of a two circle Venn Diagram in InDesign CS6?

    Hello - Does anyone know how I can color the middle of a two circle Venn Diagram in InDesign CS6?

    I essentially do what Ellis recommends, although I usually use a somewhat different method:
    Draw two circles
    Copy and paste in place
    Select the topmost circles
    Use Object -> Pathfinder -> Intersect, which creates the green object in Ellis' screenshot
    Then grab the bottom-most circles and use Object -> Pathfinder -> Exclude Overlap
    Lastly, with your Exclude Overlap circles still selected, use Release Compound Paths.
    This has the same effect, but I don't love the anchor-points-and-scissors method myself. Many years ago I taught myself Illustrator with a flaky mouse on an irregular surface; it left me with a pathological hatred of tasks that require fiddly mouse-work. So I have keyboard shortcuts for all of the above, and can select all of the objects without having to very carefully mouse over a path. If you're fast with fiddly mouse-work, Ellis' method will probably work better for you than mine.

  • Does anyone know how to get a white line across text like the USA basketball logo?

    does anyone know how to get a white line across text like the USA basketball logo?

    Draw the shape which is to be knocked out (a line in the example) in a layer above the logo. The colour doesn't matter because it will be made invisible.
    Double-click in the space to the right of the layer's name in Layers panel to open its Layer Style window where advanced blending can be modified.
    Set Fill Opacity to zero and Knockout to "Deep" or "Shallow" depending on whether the knockout should be limited to a containing Group.

Maybe you are looking for

  • AR Aging Problem (S_ALR_87012178)

    Hello, I need some help.  I've noticed that the aging buckets are changing over time when using t/code S_ALR_87012178.  We use that transactions to pull open items aged in certain buckets.  I've needed to go back and rerun several aging from months a

  • Synching playlist from iphone back to computer

    I lost my hard drive a couple of weeks ago, my library (thankfully) was on a networked external drive, so the tunes are still there. However since iTunes was on the partition that crashed, I had to do a full reinstall. My playlist no longer shows up

  • Spot healing brush alignment problem

    Using Photoshop CS4 (11.0) on a Mac with 10.5.6. Sometimes the spot healing brush works as expected. However, after working for a while, the alignment seems to be off--I hover the cursor over the spot I want to retouch, but when I click the mouse the

  • From PS to cProjects

    Hi expertcs, we need to replicate R/3 PS Project in cProject project. As process : when, in R/3 PS, a project is created by the user, automatically a cProject is created with a phase and task structure similary to the R/3 PS WBS structure. From the S

  • Keep getting invalid destination port message every 30 sec in Console

    Hi, this is my first post so be easy on me. I have been checking up on a possible attack on my website and looking for things that may have caused visits/dowloads to blow out.  While do this I looked at my Console app on my iMac 2.4 Ghz Intel Core 2