Spectrometer signal processing.

11 ビュー (過去 30 日間)
Daniel
Daniel 2024 年 12 月 2 日
コメント済み: Star Strider 2025 年 2 月 5 日 12:23
Hi guys,
I got my spectrometer data in this format save as a notepad file:
I would like to covnert time on the graph strat from 0 seconds and dont know how to covvert that.
Units_11:211
1729167932375 13:25:32.375 405650.13
1729167932475 13:25:32.475 400621.04
1729167932575 13:25:32.575 398764.17
1729167932675 13:25:32.675 400905.63
1729167932775 13:25:32.775 400606.19
1729167932875 13:25:32.875 400141.29
Can someone help me with that? Thank you

採用された回答

Star Strider
Star Strider 2024 年 12 月 2 日
One approach —
Data = {1729167932375 '13:25:32.375' 405650.13
1729167932475 '13:25:32.475' 400621.04
1729167932575 '13:25:32.575' 398764.17
1729167932675 '13:25:32.675' 400905.63
1729167932775 '13:25:32.775' 400606.19
1729167932875 '13:25:32.875' 400141.29};
T1 = cell2table(Data);
Time = datetime(T1{:,2}, InputFormat='HH:mm:ss.SSS', Format='HH:mm:ss.SSS');
ElapsedTime = seconds(Time - Time(1));
T1 = removevars(T1,2);
T1 = addvars(T1, ElapsedTime, 'Before',2)
T1 = 6x3 table
Data1 ElapsedTime Data3 __________ ___________ __________ 1.7292e+12 0 4.0565e+05 1.7292e+12 0.1 4.0062e+05 1.7292e+12 0.2 3.9876e+05 1.7292e+12 0.3 4.0091e+05 1.7292e+12 0.4 4.0061e+05 1.7292e+12 0.5 4.0014e+05
figure
plot(T1{:,2}, T1{:,3})
grid
title('Spectrometer Plot')
I suspect that you will import your file (not provided) with readtable. This approach should work with it.
.
  16 件のコメント
Daniel
Daniel 2025 年 2 月 5 日 10:32
Great, thank you for your answer and brief explanation. I really appreciate it!
Star Strider
Star Strider 2025 年 2 月 5 日 12:23
As always, my pleasure!

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

その他の回答 (1 件)

Daniel
Daniel 2025 年 2 月 5 日 10:30
Great, thank you for your answer and brief explanation. I really appreciate it!

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by