Unsure how to handle .mat data from keysight 34465A

5 visualizzazioni (ultimi 30 giorni)
May Li
May Li il 23 Feb 2024
Commentato: Alexander il 23 Feb 2024
I have exported a .mat file from a Keysight 34465A multimeter and would like to plot this data. I have successfully been able to generate a plot, image attached.
The issue I am running into is with the X-axis. I had assumed that this axis would be time starting from 0 seconds, but I am seeing values that do not make sense to me in the Time_s data column of the .mat file. I need help understanding how to convert the values in the Time_s column to actual time in seconds.
Below is the code I'm using to plot the data. Please note that you will need to specify the Data Folder where the .mat file is saved on your machine.
%% Specify folder where files are located
dataFolder = 'enter your own data folder here';
filePattern = fullfile(dataFolder, '*.mat');
Files = dir(filePattern);
%% parsing data and plotting
for k = 1 : length (Files)
baseFileName = Files(k).name;
fullFileName = fullfile(Files(k).folder,baseFileName);
fprintf(1, 'Now reading %s \n', baseFileName);
dmm_data(k,:) = load(fullFileName).'; %.' is non-hermitian transpose
X = dmm_data(k).Time_s;
Y = dmm_data(k).Channel1_Ohm;
figure(1)
plot(X,Y,'o','DisplayName',baseFileName)
xlabel('Time [s]')
ylabel('Resistance [Ohms]')
title('Raw Time vs Raw Resistance')
legend show
grid on
hold on
end

Risposte (1)

Fangjun Jiang
Fangjun Jiang il 23 Feb 2024
It is easy to make it start from zero by off-setting the first value
X = dmm_data(k).Time_s-dmm_data(k).Time_s(1);
But what do you know about the unit of the data?
After off-setting, the first value is 0, the second value is 3454320
If the unit is second, it is about 40 days.

Categorie

Scopri di più su Data Import and Analysis in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by