How do I create a table containing a character array if it has only one row?
Ältere Kommentare anzeigen
This works fine:
Time = [1;2];Force = [12;17];ID = ['ab';'cd'];
T = table(Time,Force,ID)
But this fails:
Time = [1];Force = [12];ID = ['ab'];
T = table(Time,Force,ID)
There may be a good reason for this, but the behaviour does not seem logical to me.
Does anyone have good workaround?
1 Kommentar
Stephen23
am 4 Mär. 2022
"There may be a good reason for this"
Yes: single character vectors are presumed to be part of name-value arguments.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Aerospace Blockset finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!