Is there a way to convert table columns and terms into regular numbers?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I made Table set from excel file.
Timeline = readtable('Timeline.xlsx');
Lidar_DeltaT = Timeline(2, 6);
Lidar_Distance= readtimetable('Lidar Cycle.txt');
summary(Lidar_Distance);
Lidar_Distance.Time = Lidar_Distance.Time + seconds(Lidar_DeltaT);
Timeline(2, 6)'s number value is 1
I want to make
"Lidar_Distance.Time = Lidar_Distance.Time + seconds(Lidar_DeltaT);"
line has same meaning of the line
"Lidar_Distance.Time = Lidar_Distance.Time + seconds(1);"
But It occurs an error. What should I do?
0 Commenti
Risposte (1)
Steven Lord
il 22 Ago 2020
You haven't showed us the text of the error, but I'm guessing it was:
Error using seconds (line 19)
Input data must be a real, numeric array.
Using parentheses to index into a table array (like Timeline) returns a smaller table.
Using curly braces to index into a table array returns the contents of those elements of the table.
Using dot to retrieve a variable from a table array returns the contents of that variable.
t = table(123)
s1 = seconds(t(1, 1)) % Throws an error
s2 = seconds(t{1, 1}) % Works
s3 = seconds(t.Var1) % Also works
If that's not the text of the error, please show the full and exact text of the error (all the text displayed in red in the Command Window.)
0 Commenti
Vedere anche
Categorie
Scopri di più su Tables in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!