필터 지우기
필터 지우기

how to get square matrix?

조회 수: 2 (최근 30일)
Aniket
Aniket 2013년 3월 17일
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
Azzi Abdelmalek 2013년 3월 17일
편집: Azzi Abdelmalek 2013년 3월 17일
Which Matrices are you allowed to change?
Aniket
Aniket 2013년 3월 17일
f, g, r matrices

댓글을 달려면 로그인하십시오.

답변 (1개)

Azzi Abdelmalek
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];

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by