logging time and data and store it in a matrix
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Star Strider
le 24 Avr 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 commentaires
Star Strider
le 24 Avr 2021
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!