logging time and data and store it in a matrix
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am using a National Insturments device with analog inputs.
I want to meassure the voltage of a analog port and store the date and time (with every meassurement) in a matrix next to the data of the analog port.
example:
date time data
24/4/2021 12:53:20 1.13
24/4/2021 12:53:21 1.14
24/4/2021 12:53:22 1.15
What is the best way to achieve this?
0 comentarios
Respuestas (1)
Star Strider
el 24 de Abr. de 2021
It is possible to use detectImportOptions and set the variables, however I find the following approach easier:
T1 = readtable('Niet hier Example File - 2021 04 24.txt');
date_time = T1.date+T1.time;
date_time.Format = 'dd/MM/yyyy HH:mm:ss';
data = T1.data;
T2 = table(date_time, data);
producing:
T2 =
3×2 table
date_time data
___________________ ____
24/04/2021 12:53:20 1.13
24/04/2021 12:53:21 1.14
24/04/2021 12:53:22 1.15
.
2 comentarios
Star Strider
el 24 de Abr. de 2021
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!