12-08-2012 08:51 AM
Hi,
Can anyone show me how to create an array of x values using for loop to the make the attached vi work.I'm new to labview so step by step explanation is very useful for me to learn about this program.
Thanks in advance.
12-08-2012 03:13 PM
RKN,
The x values are the times at which the data samples are taken. It looks like you sample at 100 samples per second and read 1000 samples. The x values would then be 0.00, 0.01, 0.02, ... 9.99. There are several ways you can get this. One is to use a for loop to generate an array of 1000 elements. Inside the loop calculate i*0.01 and autoindex the result at the right border. Another way, somewhat simpler although the details are hidden, is to use Ramp Pattern.vi in the Signal Processing >> Signal Generation palette. Without knowing what you signal looks like, I cannot tell how many samples you may get from the Trigger and Gate VI. You will need to adjust the length (and perhaps the start time) of the x array to match the length of the data array subset.
What is the purpose of the Dynamic Data Type to Array and Array to Dynamic Data Type conversions at the input to the Curve Fitting VI? This process will cause the loss of all timing information from the data fed to the VI.
Lynn