Tables in Live Editor not consistent
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello:
I'm coding a program using the Live editor and at the end of it I had a surprise.
Along the program the tables displayed properly like the following image, using this command
array2table(ema25n)
But at the end of the script I'm getting this useless output, using the same command:
array2table(ref_n_2,"VariableNames",["N1","N2","N3","N4","N5"])
And both are generated with the same command:
array2table()
But the result is completely different.
I'm using the latest Matlab (2023b) in a MacBook Pro M1.
I restarted the program several times (I found it solves other problems like graphics in Live Editor), but it doesn't work for thi kind of problem of the output format of the tables.
0 commentaires
Réponses (2)
Sulaymon Eshkabilov
le 15 Déc 2023
Your output is correct, e.g.:
MAG5 = magic(5);
D1 = array2table(MAG5)
D2 = array2table(MAG5, 'VariableNames',["C1", "C2", "C3", "C4", "C5"])
2 commentaires
Dyuman Joshi
le 15 Déc 2023
The question is not about the values but how the output is displayed. You can see the difference of how tables are displayed in the 2 images shown in the problem description.
Voir également
Catégories
En savoir plus sur Data Type Conversion 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!