在LabVIEW中,有没有更好的方法来创建具有n个元素的一维数组? [英] Is there a better way to create a 1D array with n number of elements in LabVIEW?
问题描述
这是我的工作,有人能做得更好吗?
Here is what I did, anyone have a better way of doing it?
他们是否具有内置功能来执行此操作?我刚开始使用LabVIEW可能已经忽略了.就像在MATLAB中一样:
Do they have built-in function to do this? I just started using LabVIEW might have overlooked. Like in MATLAB its just:
x = (0:10-1)
和在Python中:
x = range(10)
推荐答案
创建范围的最简单方法是完成操作-但直接连接索引终端并删除移位寄存器.没有内置的方法可以做到这一点.唯一的潜在收益就是在图表上使用更少的空间.
The easiest way to create a range, is to do as you've done - but wire the indexing terminal directly and dropping the shift register. There is no built-in way to do this. The only potential gain of that would be to use slightly less space on the diagram.
正如Yair所指出的那样,有一种内置的方法可以以渐变模式的形式来完成此操作.该VI具有更大的可配置性,例如在将范围划分为N个样本或按增量进行选择.但是,它确实需要完整的开发许可证(在信号处理面板中).
As Yair pointed out, there is a built-in way to do this in the form of the ramp pattern. That VI has much more configurability, for example choosing between divide range into N samples or by delta. It does require the full development license however (in the signal processing palette).
这篇关于在LabVIEW中,有没有更好的方法来创建具有n个元素的一维数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!