Unsure how to handle .mat data from keysight 34465A

7 ビュー (過去 30 日間)
May Li
May Li 2024 年 2 月 23 日
コメント済み: Alexander 2024 年 2 月 23 日
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.
  1 件のコメント
Alexander
Alexander 2024 年 2 月 23 日
And the time is not linear, see plot(diff(Time_s)).

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeData 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