이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
identity matrix nth order
조회 수: 1 (최근 30일)
이전 댓글 표시
Jasneet Singh
2021년 3월 19일
n = [1:1:20];
M=eye(n).*0.02
its not working !! i got an error that says eye() can't draw n dimensional arrays..can it be corrected ?
if not is there any other alternative to this?
답변 (2개)
ANKUR KUMAR
2021년 3월 19일
편집: ANKUR KUMAR
2021년 3월 19일
n=20;
eye(n) % identity matrix of order 20
eye(randi(50,1,1)) % identity matrix of a random order generated by randi
VBBV
2022년 2월 27일
n = [1:1:20];
for k = 1:length(n)
M{k}=eye(n(k)).*0.02;
X = sprintf('Identity matrix of order %0d',k);
disp(X)
I = M{k}
end
Identity matrix of order 1
I = 0.0200
Identity matrix of order 2
I = 2×2
0.0200 0
0 0.0200
Identity matrix of order 3
I = 3×3
0.0200 0 0
0 0.0200 0
0 0 0.0200
Identity matrix of order 4
I = 4×4
0.0200 0 0 0
0 0.0200 0 0
0 0 0.0200 0
0 0 0 0.0200
Identity matrix of order 5
I = 5×5
0.0200 0 0 0 0
0 0.0200 0 0 0
0 0 0.0200 0 0
0 0 0 0.0200 0
0 0 0 0 0.0200
Identity matrix of order 6
I = 6×6
0.0200 0 0 0 0 0
0 0.0200 0 0 0 0
0 0 0.0200 0 0 0
0 0 0 0.0200 0 0
0 0 0 0 0.0200 0
0 0 0 0 0 0.0200
Identity matrix of order 7
I = 7×7
0.0200 0 0 0 0 0 0
0 0.0200 0 0 0 0 0
0 0 0.0200 0 0 0 0
0 0 0 0.0200 0 0 0
0 0 0 0 0.0200 0 0
0 0 0 0 0 0.0200 0
0 0 0 0 0 0 0.0200
Identity matrix of order 8
I = 8×8
0.0200 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0
0 0 0 0.0200 0 0 0 0
0 0 0 0 0.0200 0 0 0
0 0 0 0 0 0.0200 0 0
0 0 0 0 0 0 0.0200 0
0 0 0 0 0 0 0 0.0200
Identity matrix of order 9
I = 9×9
0.0200 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0
0 0 0 0 0 0.0200 0 0 0
0 0 0 0 0 0 0.0200 0 0
0 0 0 0 0 0 0 0.0200 0
0 0 0 0 0 0 0 0 0.0200
Identity matrix of order 10
I = 10×10
0.0200 0 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0 0
0 0 0 0 0 0.0200 0 0 0 0
0 0 0 0 0 0 0.0200 0 0 0
0 0 0 0 0 0 0 0.0200 0 0
0 0 0 0 0 0 0 0 0.0200 0
0 0 0 0 0 0 0 0 0 0.0200
Identity matrix of order 11
I = 11×11
0.0200 0 0 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0 0 0
0 0 0 0 0 0.0200 0 0 0 0 0
0 0 0 0 0 0 0.0200 0 0 0 0
0 0 0 0 0 0 0 0.0200 0 0 0
0 0 0 0 0 0 0 0 0.0200 0 0
0 0 0 0 0 0 0 0 0 0.0200 0
Identity matrix of order 12
I = 12×12
0.0200 0 0 0 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0 0 0 0
0 0 0 0 0 0.0200 0 0 0 0 0 0
0 0 0 0 0 0 0.0200 0 0 0 0 0
0 0 0 0 0 0 0 0.0200 0 0 0 0
0 0 0 0 0 0 0 0 0.0200 0 0 0
0 0 0 0 0 0 0 0 0 0.0200 0 0
Identity matrix of order 13
I = 13×13
0.0200 0 0 0 0 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0 0 0 0 0
0 0 0 0 0 0.0200 0 0 0 0 0 0 0
0 0 0 0 0 0 0.0200 0 0 0 0 0 0
0 0 0 0 0 0 0 0.0200 0 0 0 0 0
0 0 0 0 0 0 0 0 0.0200 0 0 0 0
0 0 0 0 0 0 0 0 0 0.0200 0 0 0
Identity matrix of order 14
I = 14×14
0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0.0200 0 0 0 0
Identity matrix of order 15
I = 15×15
0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0
Identity matrix of order 16
I = 16×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 0 0 0
0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0
Identity matrix of order 19
I = 19×19
0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0
Identity matrix of order 20
I = 20×20
0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0.0200 0 0 0 0 0 0 0 0 0 0
Try using a loop
참고 항목
카테고리
Help Center 및 File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기
태그
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 (한국어)