Clear Filters
Clear Filters

how to get square matrix?

2 views (last 30 days)
Aniket
Aniket on 17 Mar 2013
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 Comments
Azzi Abdelmalek
Azzi Abdelmalek on 17 Mar 2013
Edited: Azzi Abdelmalek on 17 Mar 2013
Which Matrices are you allowed to change?
Aniket
Aniket on 17 Mar 2013
f, g, r matrices

Sign in to comment.

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 17 Mar 2013
f=zeros(10,1)
g=zeros(1,6)
r=zeros(1,5)
r(1,1)=3.9805e-7
n=[Q f; g r];

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!