How do I create a table containing a character array if it has only one row?
显示 更早的评论
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 个评论
Stephen23
2022-3-4
"There may be a good reason for this"
Yes: single character vectors are presumed to be part of name-value arguments.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Aerospace Blockset 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!