MATLAB Answers

Is there a way to extract the x data values from the readWaveform function in Quick-Control Oscilloscope ?

5 views (last 30 days)
Joshua, Tjun Minh Moo
Joshua, Tjun Minh Moo on 10 Jul 2018
Edited: Walter Roberson on 17 Aug 2018
I need to extract the time values as well which is the x-axis data. I am currently using the DPO4014B oscilloscope from Tektronix. I've also tried installing the ivi driver but im not sure how to use the function to read the waveform.

Answers (1)

Andrei Ursache
Andrei Ursache on 17 Aug 2018
Currently you need to generate the waveform time values by using AcquisitionTime and WaveformLength properties. For example, if o is your oscilloscope object:
y1 = readWaveform(o);
t = linspace(0, o.AcquisitionTime, o.WaveformLength);
plot(t, y1)
xlabel('Time (s)')
ylabel('Voltage (V)')
You might also find the following example app useful:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!