cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Plotting Channels of different length

Plotting Channels of different length

Hey guys,

 

Suppose I have two channels of data A and B.  Channel A was aquired at 0.05Hz and Channel B was aquired at 0.5Hz, both for 5 hours.  This would leave me with 36,000 data points for channel B and 360,000 for channel A.  In this scenario, what is the best way to plot A vs. B.  So the first data point of Channel B would need to match up with the 10th data point of Channel A and the second data point of Channel B would need to match up with the 20th data point of Channel A etc.  Thanks for any help.

0 Kudos
Message 1 of 2
(2,057 Views)

Re: Plotting Channels of different length

Hi atlasengineer,

 

If ChannelA has its own TimeA channel and ChannelB has its own TimeB channel, then you can reuse those channels in the below procedure.  If ChannelA and ChannelB are waveform channels, then you can create the TimeA and TimeB channels by using the ANALYSIS dialog "Channel Functions >> Numeric Channels <-> Waveform Channels" twice.  Otherwise you will need to create TimeA and TimeB from scratch by using the ANALYSIS dialog "Channel Functions >> Generate Numeric Channel" twice.

 

Once you have the TimeA and TimeB channels, then you can use the ANALYSIS dialog "Curve Fitting >> Linear Mapping" to resample {TimeA, ChannelA, TimeB} to create a new ChannelAb, which will be the same length as ChannelB but will have the ChannelA values in all the right rows.  You can choose in that dialog to linearly interpolate between the ChannelA values or to hold the ChannelA values 10 times each.

 

Brad Turpin

DIadem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 2
(2,043 Views)