이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
Why doesn't my matrix appear without missing columns
조회 수: 3 (최근 30일)
이전 댓글 표시
The matrices outputs come out wrong. Eg. I create a 3x3 matrix, but the output shows only 2 columns. I am trying to make teaching documents, but these errors keep me from doing so.
댓글 수: 17
Raj
2020년 1월 14일
"I create a 3x3 matrix, but the output shows only 2 columns" - There is no logical reason for this to happen. We can't help unless you show your process and data!
Christopher Winfield
2020년 1월 14일
It happens after I use 'format rat'. The correct size of the matrix is displayed but the last column is removed.
Christopher Winfield
2020년 1월 14일
I allowed the updates but the problem persists - even after I remove 'format rat'
Christopher Winfield
2020년 1월 14일
편집: per isakson
2020년 1월 15일
Try it using format rat. Someone else in our department was able to reproduce this. It presents as a clickalbe output, presenting the dimensions of the output, but not the whole output.
Adam Danz
2020년 1월 14일
format doesn't change the size of a variable.
format rat
A=[1,2;3, 4]
size(A) % = [2,2]
"Someone else in our department was able to reproduce this."
Perhaps there's some action being taken on the matrix but I can tell you that the matrix in your quesiton (A) is a 2x2 matix and will never be a 3x3 matrix under any format.
Image Analyst
2020년 1월 15일
Your screenshot shows you creating a 2x2 matrix with one column showing, NOT a 3x3 matrix with 2 columns showing as you said.
Anyway, I get exactly what is expected.
Are you sure that you didn't create A by stitching together some column vectors with one being null, as Walter suggested?
Christopher Winfield
2020년 1월 15일
Wow. Maybe that was another example. I hope that doesn't disqualify me for addressing my problem. OMG
Adam Danz
2020년 1월 15일
편집: Adam Danz
2020년 1월 15일
You can see in your screen shot that A is 3x3.
Here's the output when I run that code,
However, when I resize the command window to make it narrow, I can make it appear as if A only has 2 columns (nothing changed between these 2 screen shots other than resizing the command window).
Your command window has plenty of space to the right of the 2nd column shown in your screenshot but you may want to double check that this isn't causing the issue.
채택된 답변
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)