annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Graph using only a few elements of array

Risolto!
Vai alla soluzione

Hi,

I am in "for loop", have array of elements(ex: 10) and doing some calculations.

Now i want to generate graph using this array. I can do it for all elements.

But i want to draw graph of only from Row 2 to 8 elements.

How can i?

Scarica tutti
0 Kudos
Messaggio 1 di 6
3.486Visualizzazioni
Soluzione
Accettato da autore argomento sacsk123

Hello,

 

insert "Array Subset" function into the array wire before the graph und set "index" and "length" input as needed.

 

Hope this helps.

UliB

Messaggio 2 di 6
3.462Visualizzazioni

Hi UliB,

This works like a charm.I didnt expect even after bundling arrays, we can select the start and end of array. Thank you for that.

Now,  little addition to this.

what if i have x-axis elements inside the "for loop" and y-axis elements are outside the for loop?

How to bundle these 2 arrays and draw graph?

The arrays and for loops confuse me a lot.

0 Kudos
Messaggio 3 di 6
3.394Visualizzazioni

@sacsk123 wrote:

Hi UliB,

This works like a charm.I didnt expect even after bundling arrays, we can select the start and end of array. Thank you for that.

Now,  little addition to this.

what if i have x-axis elements inside the "for loop" and y-axis elements are outside the for loop?

How to bundle these 2 arrays and draw graph?

The arrays and for loops confuse me a lot.


You'll need as many X-elements as Y-elements - as i interpret your text it sounds like you'll end up with skewed arrays.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Messaggio 4 di 6
3.386Visualizzazioni

Hello,

your data type is 1D array of cluster of 2 elements, so you have to bundle your elements together and create an array (autoindexing).

I see you are using picture indicator to show the graph. I would use a XY Graph (not 2D picture), which can use a cluster of two 1D array as data type. In this case you would bundle X array and Y array after for loop together and wire it directly to XY Graph indicator.

 

Hope this helps

UliB

0 Kudos
Messaggio 5 di 6
3.368Visualizzazioni
Soluzione
Accettato da autore argomento sacsk123

Hi UliB,

In for loop,I was clubbing elements of 2 arrays using the "bundle by name" and come out of loop and use XY graph.This works fine.

But for this case(1 array inside the loop and other array outside the loop) - i just got both arrays outside the loop and used "Build XY graph". It worked for me.

 

Thanks for the help.

0 Kudos
Messaggio 6 di 6
3.359Visualizzazioni