Azzera filtri
Azzera filtri

Tables in Live Editor not consistent

5 visualizzazioni (ultimi 30 giorni)
Sergio Sanz
Sergio Sanz il 15 Dic 2023
Risposto: Sergio Sanz il 20 Dic 2023
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.

Risposte (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov il 15 Dic 2023
Your output is correct, e.g.:
MAG5 = magic(5);
D1 = array2table(MAG5)
D1 = 5×5 table
MAG51 MAG52 MAG53 MAG54 MAG55 _____ _____ _____ _____ _____ 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
D2 = array2table(MAG5, 'VariableNames',["C1", "C2", "C3", "C4", "C5"])
D2 = 5×5 table
C1 C2 C3 C4 C5 __ __ __ __ __ 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
  2 Commenti
Dyuman Joshi
Dyuman Joshi il 15 Dic 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.
Sergio Sanz
Sergio Sanz il 20 Dic 2023
Exactly!
The question is why the way the table is not displayed at the end of the script as cells with lines (as you can see in the screenshots) and the possibility of navigate to the end of the table instead the format "command window like".
I'm working (as you can see in the images with big tables and it is not useful to see only a piece of the table and ellipses, apart from the impossibility of maintaining a coherent format throughout the script in case of transforming it into a pdf document.
@Dyuman Joshi understood perfectly what was my problem.
I don't know if it's a matter of the size of the Live Script: The problem seems to occur from line 420 onwards.
Thanks in advance for your help.

Accedi per commentare.


Sergio Sanz
Sergio Sanz il 20 Dic 2023
As an add to the question I attach a screenshot of the script where you can see 2 consecutive tables in the script with the 2 different output formats despite the same way used to generate them.
From the line 439 to the end of the script noone table has the output like the one of line 437 (and precedents).
Any suggestion about this bug and how to fix it or there is no precedent to this issue and nobody knows anything about it?

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by