필터 지우기
필터 지우기

Matrix output in live script doesn't display more than 5 columns

조회 수: 7 (최근 30일)
Steffen Weerheijm
Steffen Weerheijm 2017년 3월 6일
답변: Wesley Ratnakumar 2020년 1월 24일
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?
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)

답변 (2개)

Wesley Ratnakumar
Wesley Ratnakumar 2020년 1월 24일
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.

Markus Suuronen
Markus Suuronen 2018년 11월 17일
I had a similar problem, which was fixed when I added
format short
to the beginning of the live script.

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by