05-29-2012 07:59 AM
hi every body i'am writing cause I don't understand something. i have a big 2D array and two 1D array. the two 1D array are lists of coordonate in the big D array X and Y. I want to put a 1 value in the big 2D array each time the coordonate is in the d arrays.
that's what i did. Seems perfectly good to me but doesn't work at all. could you tell me why ? thanks
05-29-2012 08:15 AM
How are you updating the values in the array. I see you are using a local variable of an array and you are replacing the value into another array since you are always reading from the same array your local variable array will not get updated. You need to use shift register for this purpose.
Good luck
05-29-2012 08:31 AM
That example you provided has two problems:
As for the original code: I don't know what the rest of the code looks like, but if what you show is the whole thing, you need to stop using local variables so freely. I'm guessing you come from a text-based background. Local variables are not meant to be used for data storage. They are not the same as local variables in text-based languages. I have NO idea why NI decided to use that name, as it was a big mistake.
05-29-2012 08:55 AM
I just wanted the OP to understand but I agree that I shouldn't have done. Yes about the Auto indexing I workd out after posting it and I should have given a suggestion not to do it.
05-29-2012 10:07 AM
Hi,
Best Regards,
05-29-2012 10:38 AM
@Luis_AM3C wrote:
Hi,
Best Regards,
There's no need for the in place element structure here since the replace array subset already works in place.
05-30-2012 02:49 AM
Hey thanks you all for your answers very usefull. In fact i thougt that the variables have the same meaning than in C. And for the last solution Luis_AM3C witch fonction do you use to make this stange loop ? I should precice that i'm a labview beginger and i'm far from know all the techniques qnd functions 🙂 thanks every one once again by
05-30-2012 02:53 AM
Sory for the question i just open everything i found it. i'll test this solution and tell you if it worked by