LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem to create multiple case using case structure

can someone show me how do i change this vi. so i've 5 different cases which is 1111,2222,3333,4444,and default

then create 1D array for each of this case value

0 Kudos
Message 1 of 8
(3,010 Views)

Do you want to programmatically create cases based on the string entered?
Are these ever going to change?

Cory K
0 Kudos
Message 2 of 8
(3,001 Views)

Why reshape it to 2D? Get rid of the modulus and the reshape, etc. Feed the 1D array into the for loop, allowing the for loop to index the array into your case statement.

Richard






0 Kudos
Message 3 of 8
(2,998 Views)

Or... just use the Decimate 1D Array function.

 

0 Kudos
Message 4 of 8
(2,994 Views)

@smercurio_fc wrote:

Or... just use the Decimate 1D Array function.


Perfect, if the thing you're looking for is always alternating and predictable as written. If you're looking for occurrences of 1111, 2222, 3333, etc. in unpredictable indices, the case statement is most commonly used.

Richard






0 Kudos
Message 5 of 8
(2,985 Views)

Update to poster:

 

Please do not create another thread for a topic you're already being helped on. This is VERY irritating, as it wastes our time giving you answers that have already been given.

 

For others: Please do not respond further in this thread. Provide any further input in the original thread.

0 Kudos
Message 6 of 8
(2,967 Views)

 


@broken Arrow wrote:

@smercurio_fc wrote:

Or... just use the Decimate 1D Array function.


Perfect, if the thing you're looking for is always alternating and predictable as written. If you're looking for occurrences of 1111, 2222, 3333, etc. in unpredictable indices, the case statement is most commonly used.


Yeah, I know. But then the poster didn't really provide a whole lot of information, now, did he? Oh, wait, yes he did - in the original thread

.

 

0 Kudos
Message 7 of 8
(2,961 Views)

ouh really sorry about that..but can u help me on this..u can see futher detail based on my previous thread

0 Kudos
Message 8 of 8
(2,950 Views)