Convert matrix to equations and solve it to find all possible combination of solution.

2 次查看(过去 30 天)
I have a matrix having an algebraic expression in a matrix. I need to find all possible solutions for each expression equating with 1 or -1 varying A,B,C,F,G,H as combination of (-1, -0.5,0, 0.5,1) . How should i proceed? I am unable to convert it in equations. Matrix is given below.
[ A - G + H, B + F - H, C - F + G]
[ A + G + H, B - F - H, C + F - G]
[ A + G - H, B + F + H, C - F - G]
[ A - G - H, B - F + H, C + F + G]

回答(1 个)

KSSV
KSSV 2017-3-31
a = [-1, -0.5,0, 0.5,1] ;
[A,B,C,F,G,H] = ndgrid(a,a,a,a,a,a) ;

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by