Unsure how to handle .mat data from keysight 34465A

7 次查看(过去 30 天)
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

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2024-2-23
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.

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by