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 CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by