# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## derivative integral of a signal in array ?

Hi,

I try to derive and integral my signal (array 1D of double) but i can't to calculate the dt in each case and which gives me as a result this.

this is my diagrame .
derivative -->

Integral -->

How i can to do to adjust correctly the dt for this fuction.

thank you .

Message 1 of 8
(2,004 Views)

## Re: derivative integral of a signal in array ?

Hi Sarah,

from your images it seems you try to calculate dt from the difference of the first two samples.

Why do you think you get dt when subtracting two sample values? THis would give you just dx…

You should know dt from your signal source. It would help when you would be using the waveform datatype…

Best regards,
GerdW

using LV2020 on Win8.1+cRIO
Message 2 of 8
(1,991 Views)

## Re: derivative integral of a signal in array ?

Yes,
But this is juste an example for this Sinus how i can derivate Random signal for example ?
Is there a method to extract the dt for any signal??

Message 3 of 8
(1,987 Views)

## Re: derivative integral of a signal in array ?

Hi Sarah,

Is there a method to extract the dt for any signal?

Yes, sure: you need to know the signal source and the sampling rate used at the source!

- When all you got are the sample values "x" then you lost the timing information. Ask the person, who created those signals, for the sample rate.

- Use the waveform datatype in your own VIs as it enforces the use of a proper dt information.

Best regards,
GerdW

using LV2020 on Win8.1+cRIO
Message 4 of 8
(1,970 Views)

## Re: derivative integral of a signal in array ?

Message 5 of 8
(1,966 Views)
Solution
Accepted by topic author Sarah_LAB

## Re: derivative integral of a signal in array ?

Hi Sarah,

no.

When this information is gone, then it's really gone…

Best regards,
GerdW

using LV2020 on Win8.1+cRIO
Message 6 of 8
(1,963 Views)

## Re: derivative integral of a signal in array ?

What is the dt of this source for example??
Thank youu.

Message 7 of 8
(1,943 Views)
Solution
Accepted by topic author Sarah_LAB

## Re: derivative integral of a signal in array ?

Hi Sarah,

the PtByPt function expects a "time" value at its input - did you read the help for this function?

When you know this time (aka "t") value you can easily calculate dt from it…

(As you should call this function in a loop it would be a good idea to check the loop iteration time. ;))

Best regards,
GerdW

using LV2020 on Win8.1+cRIO
Message 8 of 8
(1,930 Views)