LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulating array

Solved!
Go to solution

Hi,

 

Sorry for the non accurate title, but it was difficult to really explain it better.

 

I would like to realise this in a for loop :

 

ArrayExtract.png

 

I'm so lost when I have to manipulate these arrays !

 

Thanks you for help,

 

Sébastien

0 Kudos
Message 1 of 17
(3,893 Views)
Solution
Accepted by topic author Zepiii

This is an interesting problem.  See if this does the job for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 17
(3,857 Views)

Ooow, sorry, I forgot to precise that "Xa1,..." are in fact a number, I just wanted to give the representation of it to see where each goes after the manipulation.

0 Kudos
Message 3 of 17
(3,850 Views)

@Zepiii wrote:

Ooow, sorry, I forgot to precise that "Xa1,..." are in fact a number, I just wanted to give the representation of it to see where each goes after the manipulation.


Strings.  Numbers.  Who cares?  The array manipulation is the same.  Just change the representation inside of the array to whatever data format you need.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 17
(3,846 Views)

I know, however I thought that "for the intersting part", u meant it was because it was letters :). I was wrong.

 

I tried your method, but in the small for loop, I can't get the same icon than you for the array.

 

Here is my attached VI.

 

Thank you,

Zepiii

0 Kudos
Message 5 of 17
(3,843 Views)

I used Index Array where you used Array Subset.  And then use the autoindexing on the output tunnel of the inner loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 17
(3,838 Views)

Thank you.
People on this forum are just amazing !

It works!

 

Cheers!

0 Kudos
Message 7 of 17
(3,836 Views)

@Zepiii wrote:

 

I would like to realise this in a for loop :

 

ArrayExtract.png

 

I'm so lost when I have to manipulate these arrays !


It amazes me that you got a reasonable answer, because your question is not clear at all. 😄

 

  • Why the arbitrary restriction that it has to be done in a for loop?
  • "would like to extract this" is unclear. What is "this"? Extract cells C4-E4? Extract columns C-E? Extract Row 4?
  • What do you mean by extract? Keeping only the extracted part or keep everything except the extracted part (or both)?
  • Is this a table or a 2D array?
0 Kudos
Message 8 of 17
(3,825 Views)

Well, english isn't my mother tongue, sorry about that... Crossrulz perfectly understood my question, so just open the VI I attached and you will have the answer to all your questions 🙂

 

About the for loop, I wasn't sure about it, but it was not necessary. But at the moment, I'm working in a for loop, and this is a small part of it, so I prefer to ask to do it a for loop, in case of...

0 Kudos
Message 9 of 17
(3,819 Views)

altenbach wrote:
  • Why the arbitrary restriction that it has to be done in a for loop?

Ha.  I didn't event notice that line in the original post.

 

At least the OP gave a before and after of what they wanted.  That's the only reason I had a clue about what to do.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 10 of 17
(3,818 Views)