07-24-2013 09:03 AM
I've tried your vi and i doesn't work good because i put to 32 to 77 and was the same area if i put 32 to 45
i add you the samples if you want to try it
thanks for the help 🙂
07-24-2013 10:00 AM
Yes, you are right, (stupid error #49) I forgot we were thresholding on the X values, not the Y. X is always increasing so remove the array reversal and the logic for subtracting the index from the size of the array.
Mike...
PS: Don't lose the original code because you will need it someday when you are thresholding on the Y values. The issue is the way the threshold function is defined. It always looks for a point on a rising edge. Come to think of it, unless the pulse always occurrs in the exact same place in the dataset everytime you may end up needing to threshold on the y values anyway.
07-24-2013 11:18 AM
Srry I'm spanish and my english is very bad... I did what you say now and I think it did bad the calculation of the integral
because if I put the limit 40 to 60 says a result 15.633 and with other program it's not labview I put this limits and is 12.205
I add the image what I did...
thanks a lot :)))
07-24-2013 11:58 AM
you still need one subtraction. take the index coming from thresholding on the "b" value and subtract from it the index coming from thresholding on the "a" value. you need to calculate the number of elements to include in the output array. check the help on the array subset function.
Mike...
07-24-2013 12:10 PM
If it's like this it happens the same error that I said
:S
thanks
07-24-2013 01:07 PM
I calculate an area of 14,588 within the range 40 - 60
and an arfea of 15,678 within the range 37 - 77
what kind of integration method does your other program use?
Regards,
Alex
07-24-2013 01:16 PM
First of all thank u for the help Mike and Alex,
I use an excel program which you can see the results that I add if I put 40 to 60 it's 12..the area ..
And I think it's a good result i couldn't understand.. lol
thanks 🙂
07-24-2013 01:55 PM - edited 07-24-2013 01:55 PM
I have been sitting here trying to figure out why my data didn't look as nice as yours or Alex's - an then I realized that being Spanish you are using a comma to delimit the decimal places... Serves me right for mot looking at the data before I plot it...
Something to remember about Excel is that it doesn't calculate in the exact same way that LV does, and typically gives you a lot less control over the process. So don't be surprised if values don't exactly match, especially when there are a variety of ways to do something - like integration.
So you are good now?
Mike...
07-24-2013 02:23 PM
I think you're right....maybe this is the problem...because the excel calculates different the integration
Mike ...alex thanks for your help now I give us some kudos