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

How to increase number by every n'th iteration in loop

已解决!
转到解答

Hi

 

I am trying to build a 1D array of strings containing numbers where the value inserted into the array is increased by n'th step.

E.g. the length of the array can be arbitrary, let's say an array length of 107. The values I want to fill the array with starts from "1" (including " ", therefore a string), and for each 10th iteration the value is is increase by +1.

The should look something like this then

"1"

"1"

...

"1"

"2"

"2"

...

"2"

 

and so on until an array length of 107 is reached.

 

I tried something with some for loops, but i can't seem to get it to work.

 

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 项奖励
1 条消息(共 6 条)
5,822 次查看

Hey,

 

Try this.. you may have to insert different string functions to isolate the number if you're string is anything more then just a number.

 

- Rkll

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

22651iAE6BEE2E93E941CE

 

Felix

3 条消息(共 6 条)
5,799 次查看
解答
已被主题作者 Little_Helper 接受

Why make things complicated.

Add a number to string as needed.

22655i7956797129AC0165

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
4 条消息(共 6 条)
5,793 次查看

That is very neat. I just added a concatenate string to add " before and after the number, which solved my problem.

 

Thank you very much.

LabVIEW 8.6 / 2009 / 2010
Vision Development Module 8.6 / 2009 / 2010
VBAI 3.6 / 2010
0 项奖励
5 条消息(共 6 条)
5,782 次查看

I was searching like this vi. I played a little bit on it but exactly what I need. Thanks alot.

0 项奖励
6 条消息(共 6 条)
5,519 次查看