I'm trying to perform matrix polynomial multiplication of the type:
(A_1+A_2*y)*(B_1+B_2*y+B_3*y^2)
where y
is the variable, all the A_i
are constant matrices of the same size and all the B_i
are constant matrices of the same size, and the matrix multiplication of the form A_i*B_i
makes sense. The matrices A_i
and B_i
are known and specified by the user.
Formally the multiplication should result in C_1+C_2*y+C_3*y^2+C_4*y^3
and I would like to know the C_i
. In MATLAB, if the A_i
and B_i
are scalars, one could use 'conv'. However, if they are not scalars, the problem is not as easy. I would like to know if there is a simple way (analogous to 'conv') of doing this with matrices in MATLAB: given the A_i
and B_i
I would like to know the C_i
? Of course, I'd like this in a general sense (univariate matrix polynomials of any degree), and would highly want to avoid using the symbolic toolbox.
a = [1,1]; % <-> 1+1x
,b = [1,1]; % <-> 1+1x
,c = conv(a,b); % = [1,2,1] <-> (1+1x)*(1+1x) = 1+2x+1x^2
. Take a look at the end of my "Test by" code to understand what he is talking about :-) – matheburg