May 26, 2019, 09:31:27 PM
Robotforum | Industrial Robots Community

 2-dimensional-array to 1-dimensional array

normal_post Author Topic:  2-dimensional-array to 1-dimensional array  (Read 749 times)

0 Members and 1 Guest are viewing this topic.

October 25, 2018, 03:00:03 PM
Read 749 times
Offline

DonDiZZy


Hi there,

I am wondering if I could do something like this in VAL3

s1dArray = s2dArray[2]

like this it is not working, but is there a simple way to do so?

Basically i have a program which does whatever it does with 1-dimension of the 2-dim-array. therefore it has a 1-dim-Array defined as parameter or even as local variable.
now i want to pass a specific dimension from my 2-dim-array to that program.

thx for any ideas and replys. cheers.

Today at 09:31:27 PM
Reply #1

Advertisement

Guest

October 27, 2018, 04:26:28 PM
Reply #1
Offline

TygerDawg


I am not aware of any clever function like what you want.
I would approach this problem by:
  • initialize a new 2-dimension array
  • run a for-next loop to take elements from your 1-D array and populate the corresponding vector of the 2-D array
  • do whatever else is needed to populate the remaining vector of the 2-D array

This should take about 2 minutes of coding and a few milliseconds of execution time to accomplish.  :icon_wink:
TygerDawg
Blue Technik
Virtuoso Robotics Engineering
www.bluetechnik.com


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
Copying strings from two-dimensional array

Started by RoboticsMan on KUKA Robot Forum

2 Replies
479 Views
Last post August 10, 2018, 06:42:55 AM
by RoboticsMan
xx
Checking current array index and array content

Started by iK!_!KA on KUKA Robot Forum

3 Replies
1073 Views
Last post October 17, 2017, 08:07:44 PM
by panic mode
xx
Move the robot along a complex three-dimensional trajectory

Started by firefly on KUKA Robot Forum

13 Replies
779 Views
Last post December 05, 2018, 09:38:26 AM
by firefly
question
KRL - Single Char array to multidimensional Char array

Started by mattecst93 on KUKA Robot Forum

2 Replies
400 Views
Last post September 21, 2018, 03:08:38 PM
by SkyeFire