how can i convert table of string to a single row vector
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1211378/image.png)
i want to make a single vector of transcript character as a single row without these symbols " "
0 commentaires
Réponses (2)
Voss
le 28 Nov 2022
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 commentaires
Seth Furman
le 28 Nov 2022
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 commentaires
Voir également
Catégories
En savoir plus sur Line Plots 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!