Search code examples
matlabmultiplicationparametric-equations

Parametric Matrix Multiplication


Does matlab supports such multiplication?? enter image description here I searched a lot and find these

>> X = @(a1,a2,a3,a4)[a1 a2;a3 a4];
>> Y = @(b1,b2,b3,b4)[b1 b2;b3 b4];
>> % Something like ==> X*Y

But this just solves an equation with "value" and does not solve parametric for me. Does matlab support such a multiplication?


Solution

  • Maybe more of a long comment than an answer, but are you looking for symbolic variables? It requires the Symbolic Math Toolbox.

    Example:

    clc
    clear
    
    syms a1 a2 a3 a4 b1 b2 b3 b4
    
    A = [a1 a2;a3 a4]
    B = [b1 b2;b3 b4]
    
    C = (A*B)
    
    C =
    
    [ a1*b1 + a2*b3, a1*b2 + a2*b4]
    [ a3*b1 + a4*b3, a3*b2 + a4*b4]
    

    Is this what you mean by "parametric matrix"?