how can i convert table of string to a single row vector
15 次查看(过去 30 天)
显示 更早的评论
i want to make a single vector of transcript character as a single row without these symbols " "
0 个评论
回答(2 个)
Voss
2022-11-28
Something like this?
% making a table like yours:
transcript = table(["the"; "discreet"; "forier"; "transform"; "of"],[0.99085; 0.89288; 0.92346; 0.87114; 0.74899], ...
'VariableNames',{'Transcript' 'Confidence'})
% make a row vector of the words in the first column:
result = sprintf('%s',transcript{:,1})
% or maybe this is better:
result = sprintf('%s ',transcript{:,1});
result(end) = ''
0 个评论
Seth Furman
2022-11-28
Better yet, just call join on the Transcript variable
transcript = table(["the"; "discreet"; "forier"; "transform"; "of"],[0.99085; 0.89288; 0.92346; 0.87114; 0.74899], ...
'VariableNames',{'Transcript' 'Confidence'})
join(transcript.Transcript)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!