Biomedical User Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Create an array with n elements separated by x value

Hello,

I want to build an Array tu use in a XY graph.

The array must have N elements separated by 0.1. Example: (N=5) 0 0.1 0.2 0.3 0.4

Can anyone help me with this?

Best regards.

Carlos

0 Kudos
Message 1 of 2
(2,988 Views)

Carlos,

here's your solution.

Array.png

Verbal this means:

Use a For-loop containing a constant of 0.1 and a multiply node. Multiply the constant and the iteration counter of the loop. Wire the product to the loops border. From outside connect a display and you're done.

semicode:

For i = 0 to N-1

Array = 0.1*i

Next i

Return Array[]

BTW. this is a Q that should be targeted to the global forums....

0 Kudos
Message 2 of 2
(2,584 Views)