Replace each 0 and 1 in an array with n number of 0s and 1s

Hi , could you please help me with this. Lets say I have this array
01001
and I want to replace each 1 and 0 with 2  ( might be 10000)  number of0s and 1s. so the result is
0011000011
Could you please help me to implement this in LV . As mentioend I should be able to repeat the bits as many time as specified . 2 times or 100000 times
Thanks

I would use Initialize Array.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Upsample.png ‏13 KB

Similar Messages

  • How to fill array with random number?

    I need to fill a 3-dimensional array that has user-controlled dimension sizes with random numbers (1-10). I'm unsure of how to do this. I feel like I have to use the initialize array and maybe the build array functions somehow but I'm not entirely sure. Any help would be appreciated. Thanks.

    Something like this
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet
    Attachments:
    Array with random number.vi ‏9 KB

  • I have read 118 files (from a directory) each with 2088 data and put them into a 2 D array with 2cols and 246384row, I want to have aeach file on a separate columns with 2088 rows

    I have read 118 files from a directory using the list.vi. Each file has 2 cols with 2088rows. Now I have the data in a 2 D array with 2cols and 246384rows (118files * 2088rows). However I want to put each file in the same array but each file in separate columns. then I would have 236 columns (2cols for each of the 118 files) by 2088 rows. thank you very much in advance.

    Hiya,
    here's a couple of .vi's that might help out. I've taken a minimum manipulation approach by using replace array subset, and I'm not bothering to strip out the 1D array before inserting it. Instead I flip the array of filenames, and from this fill in the end 2-D array from the right, overwriting the column that will eventually become the "X" data values (same for each file) and appear on the right.
    The second .vi is a sub.vi I posted elsewhere on the discussion group to get the number of lines in a file. If you're sure that you know the number of data points is always going to be 2088, then replace this sub vi with a constant to speed up the program. (by about 2 seconds!)
    I've also updated the .vi to work as a sub.vi if you wa
    nt it to, complete with error handling.
    Hope this helps.
    S.
    // it takes almost no time to rate an answer
    Attachments:
    read_files_updated.vi ‏81 KB
    Num_Lines_in_File.vi ‏62 KB

  • Replace build array with replace subset array

        Currently I am using a build array function, but would like to replace it with a replace array subset, but I am new to labview and having a lot of trouble.  I've attached a screen shot of the code I am struggling with.  Does anyone have any ideas?
    Attachments:
    Build array code.JPG ‏29 KB

    First, I'm assuming this is inside some sort of loop.  Second, I would recommend cleaning up the code a bit so the feedback node is not overhanging the edge of the case structure.  It's unclear as to what is wired to what.  Third,  I would recommend using shift registers instead of the feedback node.
    Fourth, and the main thing is that you are currently initializing a 64 element 1-D array and appending it to your array on every iteration with the build array.
    If you want to use the replace array subset.  Initialize the array to the size you want outside of the loop.   Feed it into the left hand shift register.  Replace each row (or column) with your new data.  You will need to track the iterations, and possibly add special code to shift the array, or enlarge the array in the event you have more data come in then the original size of your array.

  • How do I Help Apple Care Stop Warring with Each Other and Fix the Problem with My iPhone that They Acknowledge Creating?

    How Do I Help Apple US & Apple Europe Stop Warring With Each Other And Fix The Problem They Created?
    PROBLEM
    Apple will not replace, as promised, the iPhone 5 (A1429 GSM model) that they gave me in London, UK, with an iPhone 5 (A1429 CDMA model).
    BACKGROUND
    My iPhone 5 (A1429 CDMA model) was purchased this year in September on an existing Verizon Wireless (VZW) line using an upgrade. The purchase took place in California and the product was picked up using Apple Personal Pickup through the Cerritos Apple Retail Store. I will refer to this phone at my "original" phone.
    The original phone was taken into the Apple Store Regent Street in London, England, UK on November 15, 2012. The reason for this visit was that my original phone's camera would not focus.
    The Apple Store Regent Street verified there was a hardware problem but was unable to replace the part.
    The Apple Store Regent Street had me call the US AppleCare. At first they denied support, but then a supervisor, name can be provided upon request, approved the replacement of my original phone with an iPhone 5 (A1429 GSM model) as a temporary solution until I got back in the US. And approved that the GSM model would be replaced with a CDMA model when I came back to the US. I will refer to the GSM model as the "replacement". They gave me the case number --------.
    The Apple Store Regent Street gave me the replacement and took the original. The first replacement did not work for reasons I do not understand. They switched out the replacement several times until they got one that worked on the T-Mobile nano SIM card that I had purchased in England, UK. Please refer to the repair IDs below to track the progression of phones given to me at the Apple Store Regent Street:
    Repair ID ----------- (Nov 15)
    Repair ID ----------- (Nov 16)
    Repair ID ----------- (Nov 16)
    The following case number was either created in the UK or France between November 15 to November 24. Case number -----------
    On November 19, 2012, I went to France and purchased an Orange nano SIM card. The phone would not activate like the first two repair IDs above.
    On November 24, 2012, I went to the Apple Store Les Quatre Temps. The Genius told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault. They had me call the AppleCare UK.
    My issue was escalated to a tier 2 UK AppleCare agent. His contact information can be provided upon request. He gave me the case number -----------.
    The UK tier 2 agent became upset when he heard that I was calling from France and that the France Apple Store or France AppleCare were not helping me. He told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault.
    The UK tier 2 agent said he was working with engineers to resolve my problem and would call me back the next day on November 25, 2012.
    While at the Apple Store Les Quatre Temps, a Genius switched the phone given to from repair ID ----------- with a new one that worked with the French nano SIM card.
    Also, while at the Apple Store Les Quatre Temps, I initiated a call with AppleCare US to get assistance because it seems that AppleCare UK was more upset that France was not addressing the issue rather than helping me. I have email correspondance with the AppleCare US representative.
    A Genius at the Apple Store Les Quatre Temps switched the replacement with a new GSM model that worked on the French SIM card but would not work if restored, received a software update, or had the SIM card changed. This is the same temporary solution I received from the Apple Store Regent Street in the UK.
    By this point, I had spent between 12-14 hours in Apple Store or on the phone with an AppleCare representative.
    Upon arriving in the US, I went to my local Apple Store Brea Mall to have the replacement switched with a CDMA model. They could not support me. He told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault. My instructions were to call AppleCare US again.
    My call with AppleCare US was escalated to a Senior Advisor, name can be provided upon request, and they gave me the case number -----------. After being on the phone with him for over an hour, his instructions were to call the Apple Store Regent Street and tell them to review my latest notes. They were to process a refund for a full retail priced iPhone 5 64BG black onto my credit card so that I could use that money to buy a new iPhone 5 64GB black at the Apple Store Brea Mall to reoslve the problem.
    The Apple Store Regent Street did not process my refund. He, name can be provided upon request, told me that the AppleCare US did not do a good job reviewing my case, that they were incapable of getting to the bottom of it like they were, and instructed me to call AppleCare US and tell them to review this case number and this repair id. I asked if he read the notes from the AppleCare US Senior Advisor and he would not confirm nor deny. When I offered to give him the case number he accepted but it seemed like would do no good. Our call was disconnected. When I tried calling back the stores automated system was turned on and I could not get back through.
    Now I have the full retail price of an iPhone 5 64GB black CDMA on my credit card and Apple will not process the refund as they said they would.
    I've, at this point, spent between 14-16 hours at Apple Stores or on the phone with AppleCare representatives, and still do not have the problem resolved.
    SOLUTION
    AppleCare US and AppleCare Europe need to resolve their internal family issues without further impacting their customers.
    Apple is to process a refund to my credit card for the cost of a full retail priced iPhone 5 64GB black.
    DESIRED OUTCOMES
    I have an iPhone 5 (A1429 CDMA model) that works in the US on VZW as it did before I received the replacement phone in the UK.
    Apple covers the cost of the solution because I did not create the problem.
    Apple resolves their internal issue without costing me more time, energy, or money.
    This becomes a case study for AppleCare so that future customers are not impacted like I have been by their support system.
    Does anyone have recommendations for me?
    Thank you!
    <Edited by Host>

    Thanks, but I've been on the phone with AppleCare US (where I am and live) and AppleCare UK. They continue bouncing me back and forth without helping resolve the problem.
    Perhaps someones knows how to further escalate the issue at Apple?

  • Replacing Assets Works, and Doesn't Work.

    I'm using a Dell 720 PC, QuadCore processor, Windows XP with all current service packs and patches, 4GB RAM, and Premier Production Studio CS3 (with all patches).
    I have a dual-boot system, with a "Clean" install (only the OS, Premier, TMPGEncXpress and Cineform NeoScene) on one disk, and a "Messy" install on another disk (all the above listed software, plus everything else under the sun, including anti-virus and anti-spyware software, email/ftp clients Nero 7 etc).
    I have an HD (1440x1080, 30FPS) project which was originally created on the Messy system. It's about 8 minutes long and created with a Canon XH-A1. The project consists of a video file (created in Adobe Media Encoder from the original Premier Pro CS3 project), one menu, one sub-menu, and two audio tracks.
    I booted to the Clean system and opened the project. I had done some work on the audio tracks, and rather than re-do the entire DVD and menus, I used Encore's "Replace Asset" feature and swapped the old audio track with the new one. No problem.
    Then I wanted to replace the main video asset with another, slightly higher quality version. I used the "Replace Asset" feature, as above, to replace the old video (a 250 MB M2V file) with the new one (also an M2V file, just slightly larger).
    It seems Encore replaces the video in a 2-step process. The progress bar zipped across to 100% on the first step, then rapidly went to 50% on the second step. From there, the time-to-completion indicator continued to increase, but the process never progressed past 50%. I looked at Windows' Task Manager, and my Quad Core processor was running at 25% overall and there was almost no disk activity. After 5 minutes, I cancelled the operation. Encore never recovered, and I had to kill it. I tried again, with the same results.
    I tried the exact same steps on the Messy Windows installation, and had no trouble replacing the video asset (it took about 6 seconds), so "something" on the Clean system is screwed up. I'd actually expect the Clean system to be the more reliable of the two!
    Do you think a reinstall of Encore is the only way to solve this? Has anyone else experienced this problem, and if so, what was the solution?
    Thanks.

    Are you using the same file name to replace the assets?
    If so - try using a different name for each incremental version instead as the cache might be getting confused/corrupted due to (apparent) multiple instances of the same asset.
    Failing that, what happens if you create new timelines instead of attempting to replace?

  • I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button

    I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button to navigate back to my starting point the bookmarks are replaced by "page thumbnails". Is there anyway to stop this from happening?

    Hi Pusman,
    While setting up the links, if you choose to open the file in a new window then you won't face this issue, then you can simply switch to the previous file and bookmark view will remain as it is.
    Does that helps with your query?
    Regards,
    Rahul

  • How can i design square signal which having a positive and negative values equal to each other and separated from each other by controlled time or distance

    How can i design square signal which having a positive and negative values equal to each other and separated from each other by controlled time or distance, As it is shown in the figure below. and enter this signal in a daq.
    Solved!
    Go to Solution.

    By the time you spend for the nice diadram you might have done the vi
    Your DAQ like to have a waveform (array of values and dt ak 1/samplerate)
    If you set the samplerate you know the array length , create a array of zeros, and set the values of both amplitudes ... 
    Since I don't want to wire others homework here are some pictures
    And there are some drawbacks is room for improvement in my solution, just think of rounding errors ... and what might happen if the arrays get bigger ....
    Spoiler (Highlight to read)
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Having trouble converting array to spreadsheet string, storing the file and coverting back to array with complex numbers

    I am working with a network analyzer. I have arrays made of 5 columns the first consisting of an integer and the next four consisting of complex numbers. I am converting the array into a spreadsheet string and then saving the file using the write characters to a file VI. That seems to work well as when I open the file in Excel all the data is there. However when I try to reverse the process, open file and convert back to array, I loose some of the data. Specifically the imaginary parts of my complex numbers are all going to zero. I have narrowed down the problem to be in the conversion from spreadsheet string to array and vice versa. I
    think the problem may be with the 'format' input to the VI. I do not have an adequate resource for this so I am not sure what to put in to accomplish my task. Any takers?

    Hi Biz
    I don't think there is a direct way of converting a complex number to a
    string, so when you convert the array to a spreadsheet string, the
    numbers would be converted to real data.
    However, you could try separating the real and imaginary parts using the
    "Numeric: Complex to Re/Im" function, and then store these - either in
    separate files or in adjacent columns/rows in the same file. Then, when
    you read in the data again, use the "Numeric: Re/Im to Complex" function
    to put the two "halves" together.
    If you actually want Excel to interpret the numbers as imaginary, then
    you'll probably want to create a string for each complex number of the
    form "Re + Im*i" (after separating the Re and Im parts), by using
    "String:Format into String" with 2 numeric inputs and the format string
    "%f+%fi".
    Reading the data back into Labview then would require splitting the
    string into the 2 pieces by using "Stringcan from String" with 2
    numeric outputs (smae precision as original numbers specified by the 2
    Default Value inputs) and the same format string "%f+%fi", and then using
    the above-mentioned "Numeric: Re/Im to Complex" function. It worked for
    me, so if you can't follow what I am describing, send me an email and I
    can email you what I did (LV 5.1.1).
    Paul
    Biz wrote:
    > Having trouble converting array to spreadsheet string, storing the
    > file and coverting back to array with complex numbers
    >
    > I am working with a network analyzer. I have arrays made of 5 columns
    > the first consisting of an integer and the next four consisting of
    > complex numbers. I am converting the array into a spreadsheet string
    > and then saving the file using the write characters to a file VI. That
    > seems to work well as when I open the file in Excel all the data is
    > there. However when I try to reverse the process, open file and
    > convert back to array, I loose some of the data. Specifically the
    > imaginary parts of my complex numbers are all going to zero. I have
    > narrowed down the problem to be in the conversion from spreadsheet
    > string to array and vice versa. I think the problem may be with the
    > 'format' input to the VI. I do not have an adequate resource for this
    > so I am not sure what to put in to accomplish my task. Any takers?
    Research Assistant
    School of Physiotherapy, Curtin University of Technology
    Selby Street, Shenton Park, Western Australia, Australia. 6008
    email: [email protected]
    Tel. +61 8 9266 4657 Fax. +61 8 9266 3699
    "Everyone who calls on the name of the Lord will be saved." Romans 10:12
    "For all have sinned and fall short of the glory of God, and are
    justified freely by his grace through the redemption that came by Christ
    Jesus." Romans 3:23-4

  • HT201444 4005 will appear in the recovery system hardware cause it? I have tried to replace numerous devices and cables, but still reported 4005.

    4005 will appear in the recovery system hardware cause it? I have tried to replace numerous devices and cables, but still reported 4005.

    The fix was to completely remove all Apple Software following guides in previous posts.
    Then download and re-install latest iTunes 64-bit, making sure to Run As Administrator.
    This fixed it. Now the next thing seems to be that as I move from one device to another to close and restart iTunes between each one. Treat it gently. It seems to break easily and a lot.

  • HT203164 I used to be able to print labels for burned CDs with the cover being the playlist name and the other side the song titles...now the titles print out compacted, overlapping each other and illegible. I thought it was the printer but it happened w/

    I used to be able to print labels for burned CDs with the cover being the playlist name and the other side the song titles...now the titles print out compacted, overlapping each other and illegible. I thought it was the printer but it happened w/1 other printer as well,  which I used before for this exact thing w/no problem.

    Try cleaning the print head with rubbing alcohol wipe, then replace your print head. Keep pushing the Ok. 
    Go to this link and HP shows you how.
    support.hp.com/us-en/document/c01643079
    Lucky for me it worked!

  • HP replaced my unit and cable just a few weeks ago and the unit has a dead battery and cable wont function

    No device
    HP sent me two replacment cables because after using them once both when plugged in the 2nd time, gave me the screen saying i need to use the cable meant for the device. HP determined they needed to replace my unit and sent me a new one but after again using the cable once then plugging in again to charge and load new books, the unit gives me the screen about using the cable right for the device, I used all 4 cables I now have, all are not even a month old, I even tried the cable the came with the unit when I first bought it. HP now has no email or chat support and I cannot access my pad for my books including text books for college and my portfolio. can anyone help me??

    Only folks left here are volunteers, not employed by HP.
    You'll need to contact HP by phone. Check the "Support" link at the top of each page here on the forum, and navigate to the touchpad pages for info.
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • HT1386 Photo albums replacing each other after syncing

    There's something wrong with my photos when ever I sync them into my iPod touch (5th gen). Let's say I upload album A into my iPod, everything is fine and I can see the album in my Photo app. Then I upload album B, the album replaces album A! And vice versa if I want to upload back album A! What's going on? What can I do to save all my albums and not let them replace each other?

    You can only Sync one photos folder with the iPod Touch.
    However - the solution is simple.
    Create a folder named (for example) "Touch Pictures". (Name it whatever you prefer.)
    Drag and drop album A (which presumably is a folder of its own) into the "Touch Pictures" folder.
    Drag album B into the "Touch Pictures" folder. (You now have two sub-folders inside the Touch pictures folder.)
    Sync iPod with your iTunes Library.
    On a subsequent occasion, add album C to the "Touch Pictures" folder.
    Sync iPod with your iTunes Library.
    When you look at Photos on your iPod Touch, you will now see separate "folders":
    Photo Library
    album A
    album B
    album C
    The first one - Photo Library will contain every picture as one folder. The other "folders" - album A, album B and album C will each contain only the pictures for that folder.
    On my 2nd generation Touch, the list also displays the number of pictures in the folder, but I believe later version of the iOS have dropped this.
    Message was edited by: the fiend

  • Email pdf to iPad - is there a way to open multiple pdfs at one time without having to hold each individually and open with adobe reader?

    I have a large number of pdf files to send to an iPad and it is taking forever to hold down each one and then choose to open with adobe reader.  Just wondering if there is a way to select all from the email to do the same action?

    Not that i know of but an alternate would be to use something like dropbox instead of mail. Their app works very well.

  • Jabber plan to replace WebEx Connect and CUPC

    Can someone from Cisco articulate the roadmap plan for
    WebEx Connect Client
    Cisco Unified Presence Client
    ...in light of the FCS availability of 'Jabber Branded' clients for everything now? Are there subsequent releases planned?
    I thought WebEx Connect {with CUCI Connect for UC} would be replaced by Jabber and the CUPC for Premise based deployments replaced by Jabber, and I would also only need Jabber for the Hybrid case as well?
    But both WebEx Connect client and CUPC have features today, which Jabber doesnt yet, so my educated guess is you are obviously considering this as input for the Jabber roadmap and will not retire the older clients until you have a transparent transition capability?
    WebEx COnnect: Things like Broadcast Message, Group Chat History, Incoming Chat Popup, change status from system tray, view recent emails in contact list, import contacts, and P2P (1:1) video and audio, all possible in WC, but not yet in Jabber FCS clients.
    CUPC: Things like Persistent Chat, CUP HA, Group Chat History, CLick to 'x' from Browser/Office, Desk Phone Video, Personal Contacts.
    Another guess would be that WebEx Connect will continue in parallel, as there are many Cisco customers who enjoy the WebEx SaaS offering and are not Cisco UC infrastructure accounts, and so will continue to use WC?
    But I cant 'guess' when I am standing in front of customers with severl hundred thousand dollars of CAPEX being proposed.
    Appreciate as much guidance you can give here so I can compete using Cisco.
    Steve

    With the upcoming versions of Jabber for Winows 9.1 or Jabber for Mac 9.0 the feature gap between Jabber and WC is getting smaller, and will get smaller with future releases.
    Customer can decide, ie. WebEx Connect is obviously cloud only, so for example when they prefer cloud P2P audio/video, only WC can do this. However Jabber works both cloud and on-prem, moreover if you have CUCM and a complete audio-video infrastructure, you don't focus on P2P audio.

Maybe you are looking for