My algorithm returns matrices in the class "sym", of a similar form to the following matrix.
matrix =[ a^2 + b*c, a*b + b*d][ a*c + c*d, d^2 + b*c]
I wish to switch the operators in this matrix. Such that, the '*' become '+' and vice versa. I then wish to use subs,
subs(mtx,[a b c d],[1 2 3 4])
in order to solve the matrix. Is there anyway to do this.
I can switch '*' for '+' and vice versa if I convert the matrices elements to char strings and simply search and replace, however this leaves solving the matrix for specific values of a,b,c and d problematic.
Any help would be greatly appreciated.
Regards
Ross
Best Answer