Matrix output in live script doesn't display more than 5 columns
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Matrix outputs in a live script doesn't display more than 5 columns, but there are 7 columns in the variable.
The version I'm using is 2017a (prerelease), so it might be a bug?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161386/image.png)
Here you see variable oplH having 7 columns, but you can only see the first 5.
The code:
H = [2 0 0 -1 0 0 0; %Cu
1 0 0 0 0 -8 0; %S
0 1 0 0 0 0 -2; %H
0 0 1 0 -1 0 0; %N
0 0 3 0 -1 0 -1]; %O
oplH = 2*rref(H)
0 commentaires
Réponses (2)
Wesley Ratnakumar
le 24 Jan 2020
Use disp(variable),
in the next line to get the output insted of leaving an open semi-colon. This will show the output as in your command prompt.
i.e. disp(H) in your case.
I have tried this in 2019a and 2018b.
0 commentaires
Markus Suuronen
le 17 Nov 2018
I had a similar problem, which was fixed when I added
format short
to the beginning of the live script.
0 commentaires
Voir également
Catégories
En savoir plus sur Matrices and Arrays 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!