取消
显示结果 
搜索替代 
您的意思是: 

Store elements from a 2D array in a 1D column vector

已解决!
转到解答

Hello NI Community,

I would like to store 6 elements from 2D array in a 1D column vector. Any suggestions?

 

Thanks in advance!

Best regards,

MarcLee

0 项奖励
1 条消息(共 5 条)
3,570 次查看
  • How many elements does the 2D array have, which six do you want to pick, and how are they arranged?
  • LabVIEW has just 1D arrays, there is no distinction between row and column vectors.
  • Your image makes absolutely no sense (uninitialized shift registers, long wait in inner loop, etc. etc.)

Please attach an actual VI, not pictures. Fill the array control with typical default values (enter, make default, save VI)  and tell us how the result should look like.

 

If the 2D array has exactly 6 elements (e.g. 2x3 or 3x2) and you want a 6 element 1D array in the same memory order, all you need is "reshape array". Still, there are millions of different interpretations of your description, so please clarify.

0 项奖励
2 条消息(共 5 条)
3,561 次查看

Thanks for your reply. I have attached the LabVIEW Code, so you can see how it should look like.

0 项奖励
3 条消息(共 5 条)
3,544 次查看
解答
已被主题作者 MarcLee 接受

Use Array Subset, followed by Reshape Array.  No loops needed.You'll also need a transpose.

 

2D%20array%20in%201D%20array

4 条消息(共 5 条)
3,517 次查看

Thousand thanks!!!

0 项奖励
5 条消息(共 5 条)
3,510 次查看