When I export results to a text file or csv etc, it is written in only one line, how do I make that it appear in columns?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Samuel Tárraga Habas
le 7 Déc 2023
Modifié(e) : Stephen23
le 8 Déc 2023
Hello!
sigma, x, res... are all 10 dimensional vectors that I want them to appear in different columns. When I run the code everything in the txt file is in one line, separated with comas.
T=table(sigma,x,res,dist,k,p);
csvFile = 'table_data.csv';
writetable(T, csvFile);
Réponse acceptée
Voss
le 7 Déc 2023
T=table(sigma(:),x(:),res(:),dist(:),k(:),p(:), ...
'VariableNames',{'sigma','x','res','dist','k','p'});
csvFile = 'table_data.csv';
writetable(T, csvFile);
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Report Generator 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!