How to combine two matrices

Viewed 396

I have two matrices-

A=[1;0.5;0.67;0.72;0.88;0.9]; %// which is 6 X 1, matrix

B=[0.951  0.736  0.437  0.176   0.036;   %// which is 5 X 5, matrix
     0    0.077  0.069  0.037   0.009;
     0    0      0.439  0.531   0.365; 
     0    0          0  0.154   0.210;
     0    0          0      0   0.310]

I want to combine these two matrices and make [6 x 6] matrix which is like below-

C= [1  0.951  0.736  0.437  0.176   0.036;   %//which is 6 X 6, matrix
    0   0.5   0.077  0.069  0.037   0.009;
    0     0   0.67   0.439  0.531   0.365; 
    0     0     0    0.72   0.154   0.210;
    0     0     0       0   0.88    0.310;
    0     0     0       0      0    0.9  ]

To do so, I have initialized B as B(6,6)=0 but I cannot combine these two.

Matlab experts, need your valuable suggestion and help.

4 Answers
Related