DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

changing interval MATLAB file

Hi,

 

Apologies if this is an obvious question but I'm fairly new to Diadem and still learning!

 

I'm importing a MATLAB file, which is a accelerometer signal of a sine wave. The data is recorded at 8000Hz, so when it imports 1 second is equal to 8000 data points. I belive need to change the interval to 1/8000 to convert the X data to seconds, but I'm not sure on how to do this? Can someone point me in the right direction?

 

Thanks

0 Kudos
Message 1 of 3
(3,501 Views)

Hi FTI,

 

It's hard to know for sure without seeing you data file, but it sounds like you would be best served to convert all your loaded data channels into waveform channels.  Here's a VBScript that does that for the particular cas of an 8000Hz sampling rate.

 

FOR Each Group In Data.Root.ChannelGroups
  FOR Each Channel In Group.Channels
    Call ChnWfPropSet(Channel, "Time", "s", 0, 1/8000)
  NEXT ' Channel
NEXT ' Group

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 3
(3,486 Views)

Thanks, that solves my issue!

0 Kudos
Message 3 of 3
(3,470 Views)