Remove the equidistant indices into an array

Hi all

I have a performance problem. In my code, I use two nested for loops. Externally, runs 500 times each time. Rather, an internally executes once for every pixel that I find in an outline to a picture. Number can range from 10 to 1000. And 500 x 1000 is a large number of iterations. In addition, the difference between the e pixels is minimal, I needn't pixel to build an outline.

So I thought to leave only 50 pixels to define a contour and whenever I get a certain number of pixels, the vi "remove table" allows to reduce the amount of pixels at 50. But I would avoid for loops, because computational cost would increase even if I need to go on the entire table. For example, if I have 20 pixels, and I want to reduce them to 10, I would choose index 1, 3, 5, 7, 9, 11, 13, 15, 17, 19.

I don't know if this is possible. Can you help me please?

I cheked this post:

http://forums.NI.com/T5/LabVIEW/removing-a-list-of-indices-from-an-array/TD-p/572652

but this isn't the same problem he uses for loops, in fact, I would say that mine is easier to solve and perhaps very banal, but I can't find a solution.

Thanks in advance.

Using Index table inside a loop will produce the results you want and can work quickly enough.  The attached VI selects an item in each element of the 'period '.  For testing purposes, I have two tables, one random DBL and another of sequential I32. The array of integers allows a quick check you get the tables you want.

When it is used as a Subvi with closed Panel, this averaged 33 microseconds with 1000 pixels and periods of 50 or 100 tables.  The loop Tester ran ~ 200000 iterations before I stopped to check the timing.

This corresponds to about 17 ms for your configuration of 500 x 1000.

Lynn

Tags: NI Software

Similar Questions

  • Remove the child as an object Array

    I wrote this little script, because I want to remove some of the fields that are currently listed in the objectives of the display, however she does not see the textfield as varaible name. How to convert the object to a table to become a textfield that can be removed, after have been added through

    addChild()

    This is the script

    var delayHeading:Number = 1500;
    var repeatHeading:int = 1;
    var setShow:Timer = new Timer (delayHeading, repeatHeading);
    setShow.start ();
    setShow.addEventListener (TimerEvent.TIMER_COMPLETE, maybeLater);

    var delayeading:Number = 1500;
    var repeateading:int = 1;
    var sethow:Timer = new Timer (delayeading, repeateading);
    var childnames:Array = new Array();

    var nametxt:TextField;


    function maybeLater(event:TimerEvent):void {}
    var tft:Number = 10;
    for (var i: Number = 0; i < 10; i ++) {}
    nameTxt = new TextField();
    nameTxt.Text = "YouandMe" + i;
    nameTxt.y = tft + 10;
    addChild (nametxt);
    childnames.push ("nameTxt");
    }
    sethow. Start();
    sethow.addEventListener (TimerEvent.TIMER_COMPLETE, removeAllThis);
    }


    function removeAllThis(event:TimerEvent):void {}
    for (var b:Number = 0; b < childnames.length; b ++) {}
    removeChild (childnames [b]).
    childnames.pop ();
    }
    }

    This is the error I get

    TypeError: Error #1034: Type coercion failed: cannot convert "nametxt" in flash.display.DisplayObject.
    at Untitled_fla::MainTimeline/removeAllThis()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.utils::Timer/tick()

    Any suggestions would be beneficial

    Thank you

    You may encounter problems try to pop things from one end while eliminating things from each other.  Try instead the following...

    function removeAllThis(event:TimerEvent):void {}
    var childCount:int = childnames.length;
    for (var b:Number = 0; b< childcount;="" b++)="">

    remove from the scene and the table of a sudden
    removeChild (getChildByName (childnames.pop ()));

    }
    }

  • How to remove the percentage indicator in the control of ProgressIndicator?

    I try to use the ProgressIndicator to indicate progress during loading, but I would only circle indicator and not the text of percentage below the circle. Does anyone know how to delete or move to the right side of the circle as the circle itself?

    Any help would be thank you very much. Thank you.

    Hi user,

    You must add the style sheets for things operate.

    final HBox root = new HBox();
    Scene scene = new Scene(root, 500, 250);
    scene.getStylesheets().add("file:///C:/gui.css");  //currently i've placed them inside the C:/gui.css
    final ProgressIndicator ind = new ProgressIndicator();
    ind.setId("myprogress");
    ind.setProgress(0);        
    
    Task t = new Task(){
    
         @Override
         protected Void call() throws Exception {
              while(ind.getProgress() < 1.0){
                   Thread.sleep(1000);
                   ind.setProgress(ind.getProgress()+0.1);
              }
              return null;
         }
    
    };
    
    new Thread(t).start();
    root.getChildren().add(ind);
    

    GUI. CSS [C:/gui.css]

    #myprogress .percentage {
     visibility: hidden;
    }
    

    Many things in javafx is not accessible by hard coding, so you must use the style sheet. After all it is the easiest part of the design.

    Thank you
    Narayan.

  • In trying to move the photos to the key, I've accidentally moved into my office - they kept sort of duplication and there is 7 000 or them - how to remove the easily?

    Mac Pro 10.11.4 17 "

    In trying to move photos to the key, accidentlaly I moved into my office - they kept sort of duplication and there is 7 000 or them - how to remove the easily? I've been

    Open your desktop folder in the Finder, then type 'image' in the search field in the Finder window toolbar and value of the research for "kind: Image".

    Define the scope of the search for "Desktop".

    Now, you can select all items in the window by entering ⌘A, then drag the photos in your Inbox.

    Check a second time, that the scope of the research really is 'Office' and not 'this computer '.

  • Remove the indicator framework

    How to remove the digital display framework? I tried in 'Modern', but cannot get rid of the image. It is an indicator of the 'system', but I can't change the background color to match at bottom of vi. Any ideas?

    I put the picture of what I need.

    Thank you

    Zoran

    Classic > digital single

  • BlackBerry Smartphones Blackberry Bold 9700 os6 - how to remove the status bar (3g, indicator of service) at the top

    BlackBerry Bold 9700 os6 - how to remove the status bar (3g, indicator of service) at the top?

    I love the new OS6 and MEDIA SYNC is great.  Finally my itunes music is available on my blackberry!

    You can "get rid of it.
    The only change you can make is the 5 bars can be changed by the numbers by pressing ALT + NMLL (instead of the signal bars, you see the actual level in dBm)

  • Can I remove the storage (default) of a multi-member Equallogic array group Pool

    Current config:

    1 group, 3 members Equallogic arrays: Array01, Array02 and Array03.

    3 Array01 of Pools of storage (default), Array02, Array03

    I need to remove the Array01 member to remove the group. The default storage pool moves automatically to another Storage Pool? that is Array02?

    I've already migrated all volumes and snapshots off Array01.

    Config required

    1 group, 2 tables of Equallogic members: Array02 and Array03

    2 (default?) Storage Pools Array02, Array03

    Thanks in advance.

    The default storage pool cannot be deleted.  It will just sit there like a pool empty (without the members of the group are attributed to him) if it is not used.

    -joe

  • Creative Cloub corrupted file. Because of the process manually into the system. Now, I can't reinstall or remove.

    Creative Cloub corrupted file. Because of the process manually into the system. Now, I can't reinstall or remove. even the restoration of the system does not what to do, how restore creative cloud

    Please check 'Private Message'.

    Concerning

    Megha Rawat

  • How to remove the point of my array

    Hi, I have a table with the elements. now, I want to remove all elements in the array. How can it be possible?

    It depends on what you mean by compensation. The delete operator sets an array to undefined element, the length of the array remains unchanged.

    for (var i: int = 0; i<=  yourarray.length();="">

    {

    delete [i] yourArray;

    }

  • My sim card has slipped the tray and into the phone and is locked how to remove

    Grandson bought a new iPhone and thought that he had to change sim cards.  He removed the sim card and tried to reinsert everything by putting the tray with the card in the phone, SIM slipped off the set and became stuck in the phone.  Any ideas how to remove?

    Take a pair of tweezers and VERY carefully and gently grasp the card and remove it. No doubt, try to avoid the contact pins that are inside the phone and touch the bottom of the SIM card when the card is inserted.

  • my laptop is divided into 2 profiles. How can I remove the 2 profiles without deleting the programs in profiles

    I want to remove the 2 profiles that divides my laptop. I wish well for my laptop one without loseing computer programs that have been added. My laptop is a Dell Inspiron 2650

    Oh

    Here is an answer from another forum posted by Rick Rogers:

    "There is no method of merging the accounts, simply choose one or.
    others and save the data of the impeachment.

    Start and connect to one you want to keep. Open Windows Explorer as
    Administrator (click right/run as admin) and take ownership of files in
    the other profile that you want to save (under your registered profile). You may need to go to start / Control Panel / folder
    Options/display/and check the box to see hidden and system files to do (if you do not, you will not miss important information - in particular about your programs). Move the
    files you want to put on your user profile. »

    There are some files that you should not move - they are documented in the following article: http://windows.microsoft.com/en-AU/windows-vista/Fix-a-corrupted-user-profile (which is very close to what do you except that you are not from a user account fresh but one that already exists).

    NOTE: Before removing the old profile, I would make absolutely sure all your data are moved and accessible, and that all your programs work correctly.  The time to solve a problem, if there is while you still have available data - not after it has been deleted.  Frankly, I'd let the old profile sitting there for a few weeks or more, just to be on the right side (if you have the space, and I suspect you do).

    Here is more information about the permissions you need permissions in its own right and to take ownership of:

    To view your permissions, right-click on the file/folder, click Properties, and check the Security tab.  Check the permissions you have by clicking on your user name (or group of users).  Here are the types of permissions, you may have: http://windows.microsoft.com/en-US/windows-vista/What-are-permissions.  You must be an administrator or owner to change the permissions (and sometimes, being an administrator or even an owner is not sufficient - there are ways to block access (even if a smart administrator knows these ways and can move them - but usually should not because they did not have access, usually for a very good reason).)  Here's how to change the permissions of folder under Vista: http://www.online-tech-tips.com/windows-vista/set-file-folder-permissions-vista/.  To add take and the issuance of right of permissions and ownership in the right click menu (which will make it faster to get once it is configured), see the following article: http://www.mydigitallife.info/2009/05/21/take-and-grant-full-control-permissions-and-ownership-in-windows-7-or-vista-right-click-menu/.

    To resolve this problem with folders, appropriating the files or the drive (as an administrator) and give you all the rights.  Right-click on the folder/drive, click Properties, click the Security tab and click on advanced and then click the owner tab.  Click on edit, and then click the name of the person you want to give to the property (you may need to add if it is not there--or maybe yourself). If you want that it applies to subfolders and files in this folder/drive, then check the box to replace the owner of subcontainers and objects, and click OK.  Back and now there is a new owner for files and folders/player who can change the required permissions.  You can change now switched to read-only (even if the main folder indicates that they are always read-only - you can access yourself as the owner).  You can keep them in read-only to other users, customers and administrators even (although they can support themselves and access, if they wish, and it is really not that you can do to stop it except protect the file with a password by using a 3rd party product.)  Here is more information on the ownership of a file or a folder: http://www.vistax64.com/tutorials/67717-take-ownership-file.html.  To add take ownership in the menu of the right click (which will make it faster to get once it is configured), see the following article: http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Edit/Remove the outside computer screen into video

    I just finished a shoot and my topic had a laptop open behind him with a screensaver running.  The interview lasted about 30 minutes and went very well, but really I don't want the distraction of the screen saver in the shot and the shot of culture would ruin the Visual balance.  How can I black on the screen or something to make it less sensitive?

    Thanks in advance!

    If the arm is in front of the screen, just sometimes, you can fix that by Rotoscoping. This means animate a mask following the arms that removes the respective part of replacement of your monitor.

    For this task, the following by Eran Stern tutorial might be helpful:

    http://www.sternfx.com/blog/index.php/11-2009/pen-tool-tips/

  • How to remove the random delay to the extent

    Hi guys

    I had a little problem with a measure that I do in a subvi. Take a look at the picture (do not laugh please )

    Some first explanations:

    I put online a digital high in order to initialize a piece of hardware.

    Can I activate two relays. Time zero (T0).

    Then I have to activate the piece of hardware that I've initialized at startup.

    In the meantime enabled I do measure (here called Maling). The measure is 40 channels. I do measure on 10 circuits. Each of the 3 voltages and current measurement 1. Tensions are CSR and the current is differential. Sampling is 1000 samples at 1 kHz, which gives me a resolution of 1 sample every ms.

    After the measurement, I turn off the relay and the piece of hardware that I've initialized at startup.

    The collected data is transformed into an array of 40 lines and columns of 1000 with the data. In my loop for I extracted the data and make a comparison and put the data in a chart.

    Here's my problem:

    I get a random delay on each measure. I used to get the tickcount OpenG (could use framing). In the x - y indicator, I get 1060-1072 - ish milliseconds. I tried to subtract the 1000 ms of measure and delay of 60-72-ish "millisecond" added to my chart and dataindicators, but it does not work. When I use oscilloscope on 10 channels, I get the same measurement each time. When I do in Labview, it becomes worng because of the delay. I get exactly the same extent as the oscilloscope.

    In my own defense:

    I used the DAQ Assistant, because it gives me the wiring diagram of the material on my series M of NI USB-6225. Also I am not yet familiar with the implementation of the data acquisition without help. Yes, I looked at the forum and the examplefinder, but I spend too much time on this compared to help data acquisition.

    My measure should start just after the relay was activated. I think maybe using trigger on a clock internal, but not quite sure if it will help on the delay. My thoughts of setting this up would not use the DAQ help. Set up channels by using a loop For and do the measurement.

    You can maybe share some thoughts around the problem of delay and perhaps give me a clue on where to begin to remove this time limit. My DAQ should be ok because he has a limit of 250 k samples/s and I use it only 40 k samples. Do you think that the delay that I measure either before or after the measurement of 1000 ms?

    Kind regards

    Even

    My first reaction is that you are activating the fuses in parallel with your time of measurement and measurement on both. Move your clock of departure according to plunger PA and only to measure the time of Maling for beginners.

    (RelePWR-> Fuze Center-> time-> Maling-> time)

    /Y

    (next to welcome)

  • Songs from the album split into separate albums/artists, even with the same name

    I have three songs from the album, all by the same artist, but for a reason, that they aren't bringing together under the same album or artist on iTunes. All the songs are listed separately under different artists even if the name of the artist (and album) is exactly the same:

    The same artist and album has duplicated only three times.

    I made sure all the info of the song are exactly the same as here:

    And sorting is the same too:

    So I don't know what else to do.

    If you see unexpected songs groups when you browse an album - https://support.apple.com/HT204538 - 'songs from the same album may not be grouped as expected when you view them in display Albums in iTunes."

    The following sections provide additional solutions.

    Steve MacGuire alias turingtest2 - iTunes and iPod tips and tricks - grouping beaches in Albums - http://www.samsoft.org.uk/iTunes/grouping.asp (old post on Apple Discussions http://discussions.apple.com/message/9910895#9910895)

    Quick response: select all the tracks on the album, file > info (or right-click > news > Details) and give them all a single "album artist", or check the indicator of "compilation" (as in https://discussions.apple.com/message/17670085#17670085).

    If they are several CD sets, you will also need to enter the appropriate information in the fields of number of disk.  If they are not a set of multiple CDs that you must always make sure any vacuum or disc number fields are properly defined.

    Another explanation of hhgttg27 August 2015 - https://discussions.apple.com/message/27784417#27784417

    If they won't even really check this August 2008 post by turingtest2 group temporarily change labels - https://discussions.apple.com/message/7904806#7904806 or http://www.samsoft.org.uk/iTunes/merge.asp - add a letter at the end of the name of the artist, close the read information, then open it again and remove the letter. This works often but I had cases where securities combined when a letter has been added but divorced when he was kidnapped again.

    If they are mp3 files are trying to change the version of the ID3 tag, which can cause iTunes to re - write the tags and clarify inconsistencies.  I use iTunes 7.5 (Yes, from 2007) so I can't tell you where it is in later versions.

    I had a case of grouping stubborn reality.  The tracks will be re-group in a way that has no meaning when I changed metadata.  Without going into details, I deleted tracks iTunes completely, then add the files and they are all grouped together correctly.

  • any ideas on how to remove the software malicious zebrouss?

    any ideas on how to remove the software malicious zebrouss?

    This thing I replaces my setting of search in safari - can get rid of it - don't know who got it

    You may have installed ad-injecting malicious software ("adware").

    Do not use any type of product, "anti-virus" or "anti-malware" on a Mac. It is never necessary for her, and relying on it for protection makes you more vulnerable to attacks, not less.

    Save all data first.

    Some of the most common types of adware can be removed by following the instructions from Apple. But before you follow these instructions, you can try an automatic removal.

    If you are not already running the latest version of Mac OS X ("El Capitan"), update or upgrade in the App Store you could adware to automatically remove. If you are already using the latest version of El Capitan, you can still download the current update of the Apple Support downloads page and run it. Still, some types of malware will be deleted, not all. There is no such thing as the automatic removal of all possible malware, either by OS X third party software. That's why you can't rely on software to protect you.

    If the malware is deleted in your case, you will still need to make changes to the way you use your computer to protect you from new attacks. Ask if you need advice.

    If the malware is not automatically deleted, and you cannot remove yourself by following the instructions from Apple, see below.

    This simple procedure to detect any type of adware that I know. Disabling is a procedure distinct and better still.

    Some legitimate software is funded by advertising and may display advertisements in its own windows or in a web browser while it is running. It's not malware and it may not appear. In addition, some Web sites display advertising intrusive popup that can be confused with adware.

    If none of your web browsers work well enough to carry out these instructions, restart the computer in safe mode. Allows to temporarily disable the malware.

    Step 1

    Please triple - click on the line below on this page to select it, and then copy the text to the Clipboard by pressing Control-C key combination:

    ~/Library/LaunchAgents

    In the Finder, select

    Go ▹ go to the folder...

    from the menu bar and paste it into the box that opens by pressing command + v press return. Open a folder named "LaunchAgents", or you will get a notice stating that the file cannot be found. If the file is not found, proceed to the next step.

    If the folder opens, press the combination of keys command-2 to select the display of the list, if it is not already selected. Please don't skip this step.

    There should be a column in the update Finder window. Click this title two times to sort the content by date with the most recent at the top. If necessary, enlarge the window so that all the content show.

    Follow the instructions in this support article under the heading "take a screenshot of a window." An image file with a name starting in 'Screenshot' should be saved to the desktop. Open the capture screen and make sure it is readable. If this isn't the case, capture a small part of the screen indicating that what needs to be shown.

    Start a reply to this message. Drag the image file in the editing window downloading. Alternatively, you can include text in the response.

    Leave the case open for now.

    Step 2

    Do as in step 1 with this line:

    /Library/LaunchAgents

    The record which can open up will have the same name but is not the same as in step 1. In this step, the folder does not exist.

    Step 3

    Repeat with this line:

    /Library/LaunchDaemons

    This time the file will be called "LaunchDaemons."

    Step 4

    Open Safari preferences window and select the tab 'Extensions'. If the extensions are listed, post a screenshot. If there are no extensions, or if you cannot launch Safari, skip this step.

    Step 5

    If you use Firefox or Chrome browser, open the list of extensions and do as in step 4.

Maybe you are looking for

  • 17 - k250CA: HP won't turn on, tried the Hard Reset still nothing system is 9 months old

    Afternoon in the hope of getting assistance, I tried to call tech support 4 times they keep telling me they ship me a box to send them back up after fustrating many hours and days away I decided to reach out to see if there is something, someone can

  • Satellite A60 - laptop battery not charge/work

    Hello My stop laptop when you use the battery power. It will not re-start until I plugged in to the power supply. Every time I disconnected power laptop would shutdown. laptop does not work on batteries, no lights are working.When it is plugged seein

  • Failure of system recovery - hangs on check for support in drive E

    Currently, I install a new hard drive on my Satellite P300 laptop (running vista Home premium service pack 2). I installed the new hard drive and insert the first disc of recovery and the recovery process starts well. The following text appears on th

  • Elegant Pavilion book-14 (c1w54ea)

    My laptop is more just under warranty. It fails to start. It tries but stops with a blinking blue screen. Using the f2 key and start, I did a complete check of the system. Tested system and component for hard drive test confirm a breakdown on the Har

  • c ++ updates today was wrong, now the browsers don't work-how to fix?

    y (chrome and ie) browsers do nothing now after installing the recommended update today on my netbook (XP). In addition, all the news from the Media Player library are missing.  I can't get on the net to understand what to do, or reinstall, or whatev