07-26-2010 08:43 AM
Hi,
I read N rows at a time from a file and I would like to replace a 2D array(Spike template) in original array only in specific index read from a spike list index.
Thanks for your help.
Attaching Vi and txt file.
LV 8.6
07-26-2010 09:00 AM
07-26-2010 09:30 AM
Hi GerdW,
Because I need to read N rows at a time. For example, if I choose N = 100 I should replace the spike template from the 10-th to19-th line of the first 100 rows of the original array, then I should replace the spike template from 160-th to 169-th of other 100 rpws of original array (from 100-th to 200-th row).
i hope it is clear.
07-26-2010 10:09 AM
(This is a continuation of this thread. )
Your VI will not work. All that you're doing is replacing a subset in the current chunk, which gets thrown away in the next iteration of the loop. You are STILL ignoring the pre-allocation method I showed you in your original thread. I have no idea why you keep doing this.
07-26-2010 10:44 AM
Hi smercurio,
To avoid memory full, I've tried this solution in my complete vi. It is attached. I read only N rows at a time, manipulate data and generate by using not allow regeneration.
I have tried with file of 170 MB and work fine.
Now i only want to replace a spike template(2D array) in original array only in specific index read from a spike list index.
thanks for helps!
07-26-2010 12:07 PM
anybody can help me?
i'll try again to explain problem if it is not clear.
I will appreciate any kind of help.
07-26-2010 01:49 PM - edited 07-26-2010 01:50 PM
@wasabi22 wrote:
anybody can help me?
i'll try again to explain problem if it is not clear.
Please be aware that this community is made up mostly of volunteers, many of whom, like me, have full-time jobs. We cannot be on-call 24-hours a day. Please be patient.
Now i only want to replace a spike template(2D array) in original array only in specific index read from a spike list index.
I'm sorry, but I have no idea what this means.
General code comments:
07-26-2010 04:35 PM
Thank you very much for helps and advice.
I will try to explain better.
I want to make a new [(File lenght)*9] 2D array where i want to substitute a 10*9 2D Array (called Spike template) in Original Array (that i read from file I01.txt).
I would like to substituite this 2D array(called Spike template) starting from specific indexes.
This indexes are 10, 160, 2152, 2628......
So i would like a new array where first 9 elements is the same of original array. Then from 10-th to 19-th there
is 2D array(called Spike template) and then from 10-th to 159-th the same items of original array and then from 160-th to 169-th there is 2D array(called Spike template) and so also for other indexes until the file ends.
I hope it is clear enough.
Sorry for my bad english.
I've attached vi and txt file in previous posts.
Best regards