Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

how to separate perticular column from multidimensionl array

dear all,

i am just reading CAN bus message, problem is that it is accomodated in a 11X7 array which includes frame time stamp, ID, byte length etc but i am interested in CAN data. can anybody tell me how to separate that column from all. i want to read a column of 5 with all rows. how it is possible.

0 Kudos
Message 1 of 2
(3,913 Views)

Hello Sanjay,

 

If your requirement is simply to obtain a single column from a 11x7 array, I would suggest you should do the following:

 

1. Use Transpose 2D array to obtain a transposed array

2. Use Index Array function to retrieve invidual row (which is actually the column of non-transposed array).

Use index value of 4 (zero indexed), and the output would be a 1D array containing all elements of column 4 (zero indexed) of the original array.

 

I hope this helps.

 

Regards,

Navjodh

0 Kudos
Message 2 of 2
(3,895 Views)