05-01-2012 07:25 AM
I have no error, but my array subset is not outputting anything in the loop. Is there a reason why? Attached .vi
Thanks,
Chris
05-01-2012 07:33 AM
You're only generating 100 samples, but trying to start at index 5000 on the second iteration of the loop. My math tells me that's not going to work.
05-01-2012 07:33 AM
There is no problem with the array subset function. The reason why it is not giving any data is probably it not getting any data as input. Just check the input of the array subset whether the expected data is coming or not.
05-01-2012 07:50 AM
Expected data is going in. Nothing is coming out. I changed the 5000 to 5 and 10, I still get nothing. My phase plot starts a graph but is not correct. Wow, I am new to this program. So confused.
05-01-2012 08:06 AM
Even if you change the 5000 to 5 you're still going to run out of samples. It's basic math. Your loop is hard-coded to run 25 times. In the first iteration you start at index 0, and extract 5 samples. In the second iteration you start at index 5 and extract 5 samples. In the third iteration you start at index 10 and extract 5 samples. You're going to go past the array before you reach the last iteration. Thus, the Array Subset will return an empty array, by definition. Since the output tunnel is only looking at the last iteration's value (not sure if this is intended), you are, by definition, going to get an empty array.
What did you intend to do?
05-01-2012 08:18 AM - edited 05-01-2012 08:20 AM
I agree with smercurio.
I do not know what waveform you are expecting, but I do get values.
This is what I get with the length set at 36.
05-01-2012 08:18 AM
I guess I don't fully understand how this loop and sub array work together. I am trying to ensemble average the data. I think since I am stepping at 0.001s interval for 100s then I have 100,000 data points, no?
So, if I iterate the loop 10 times with the length set at 1000, and iteration multiplied by 1000, then I should have 10 rows of 1000 data points, right?
Granted this is my 4th program I have made with Lab View, so I am learning A LOT. Trying to shake the Matlab cobwebs and rethread them in different ways.
05-01-2012 08:21 AM
Thanks Ray.R, I don't get that even! The magnitude and phase graphs should be giving me something similar to what my bode mag and phase are doing.
05-01-2012 08:22 AM
How do you average your data?
05-01-2012 08:27 AM
Using the FRF function, set to RMS Averaging using Linear averaging and with the number of averages set by the FRF function, I think I have set at 21 right now.