From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab Detrend function in DIAdem

Solved!
Go to solution

Hello,

 

I am trying to pre process some data for fft processing and in Matlab I would use the Detrend function and I was wondering if these is anything similar in DIAdem.

 

I am using DIAdem 2012

 

Thanks

Tim
0 Kudos
Message 1 of 6
(6,625 Views)
Solution
Accepted by smoothdurban

Basically in Matlab Detrend on a matrix simple subtracts the linear line of best fit from each value of data in the array.

 

For example if you have an array A[2,3,5,7,5] and you were to detend it in MatLab it would equal detA[-04, -0.4, 0.6, 1.6, -1.4].

 

If you subtract detA from A you will get A-detA[2.4, 3.4, 4.4, 5.4, 6.4]  which is exaclty the same as finding the linera line of best fit for A.

Tim
0 Kudos
Message 2 of 6
(6,592 Views)

So Tim,

 

Are you still interested in the sequence of commands in DIAdem to do something like this?  I'm confused why you marked your second post as a solution.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 6
(6,571 Views)

Nope I was able to correlate what the detrend function does in Matlab.  My solved post gives a breif example of this.

Tim
0 Kudos
Message 4 of 6
(6,547 Views)
Can you help me understand the steps neccessary to complete this in DIAdem? The results I get from subtracting a linear trend from the original waveform does not make sense. Thank you!
0 Kudos
Message 5 of 6
(5,889 Views)

Hey TobyPolocoser,

 

I would suggest creating a new forum post for this on the DIAdem board so that more people can see it.  This post is a year old, so this page may not get a lot of user traffic.  Let me know if you have any questions!

 

Thanks,

 

Myriam

0 Kudos
Message 6 of 6
(5,864 Views)