キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

index array

Simple question,

 

How do I set up an index array?  I'm used to using Matlab where it would look something like:  t = 0:0.5:3; So the array would be

 

[0 .5 1 1.5 2 2.5 3]

 

How do I do something like that in Labview?

 

Thanks

0 件の賞賛
メッセージ1/9
3,402件の閲覧回数

Programmatically, use the ramp by delta mode of ramp pattern.

0 件の賞賛
メッセージ2/9
3,396件の閲覧回数

Use the Ramp Pattern function, by delta instance, as shown:

Ramp by Delta.png

0 件の賞賛
メッセージ3/9
3,393件の閲覧回数

By the way, what you are asking for is not called "index array" in LabVIEW.  Index Array in LabVIEW refers to a specific function in LabVIEW that return an element or portion of an array (entire row or column of a 2-D array).

 

The Ramp Pattern function in LabVIEW is more like what you are asking for where you can enter the start and stop values and a number of samples and it will return an array.

0 件の賞賛
メッセージ4/9
3,391件の閲覧回数

Christian, Nathan,

 

By any chance was the polymorphic version of ramp pattern added after LV 2009?

 

I knew there was a polymorphic version.  But by chance, I happened to have LV 2009 open when I went to look for it.  Using Quick Drop, I search for Ramp, found Ramp Pattern, and when I dropped it, it only came up with the "# of samples version".  Even going to drop it by its location on the Signal Generation palette, it didn't give me the poly version.

0 件の賞賛
メッセージ5/9
3,384件の閲覧回数

Yes, the polymorphic version is relatively recent. Don't remember when it was introduced.

0 件の賞賛
メッセージ6/9
3,379件の閲覧回数

@altenbach wrote:

Yes, the polymorphic version is relatively recent. Don't remember when it was introduced.


LV10

0 件の賞賛
メッセージ7/9
3,375件の閲覧回数

Thanks a lot this is exactly what I wanted.

 

Say I want to plot a cosine function using my example from before.  If I set up the ramp from 0 to 3 using .5 increments and measure the output with the graphing tool, it's going to plot the function from 0 to 6.  How do I get it to correctly plot from 0 to 3?

 

Thanks again

0 件の賞賛
メッセージ8/9
3,360件の閲覧回数

Where are you plotting it?

 

If you are plotting it on a Waveform chart or graph, using just the double array, then you need to set your dX value for the graph.

 

If you are using an XY graph, then you need to bundle your X and Y values together.

 

Either way, look at the help for the type of graph or chart you are using.

0 件の賞賛
メッセージ9/9
3,355件の閲覧回数