how to get square matrix?
조회 수: 2 (최근 30일)
이전 댓글 표시
hello i have controller design matlab script and i want to adjust a square matrix dimension of 11*11.
*******************
Q=Csc'*Csc;
f=[0 0 0 0 0;0 0 0 0 0;0 0 0 0 0;0 0 0 0 0;0 0 0 0 0;0 0 0 0 0;0 0 0 0 0;0 0 0 0 0;0 0 0 0 0;0 0 0 0 0];
g=[0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 0 0 0 0];
r=[3.9805e-7 0 0 0 0; 0 0 0 0 4.1623e-5;3.9805e-7 0 0 0 0;0 0 0 0 4.1623e-5;0 0 0 0 0];
n=[Q f; g r];
************************
in the above Q is 10*10 matrix
f is 10*5 matrix
g is 5*10 matrix
r is 5*5 matrix
because of this i am getting 'n=[Q f; g r]' matrix 15*15 dimension
i want 'n' as a square matrix of 11*11 dimension . how should i adjust the above matrix dimensions ?
댓글 수: 2
Azzi Abdelmalek
2013년 3월 17일
편집: Azzi Abdelmalek
2013년 3월 17일
Which Matrices are you allowed to change?
답변 (1개)
Azzi Abdelmalek
2013년 3월 17일
f=zeros(10,1)
g=zeros(1,6)
r=zeros(1,5)
r(1,1)=3.9805e-7
n=[Q f; g r];
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!