Symbolically solving vectors simultaneously
조회 수: 2(최근 30일)
Hello, I have been trying to solve a vector using the symbolic toolbox and am running into an error that says "Error using maplemex
Error, (in MTM:-solve) 0 variables do not match undefined outputs.", I am currently trying to solve for a variable in a matrix that is equal to zero, below is an example.
moment=[5*q0+25 6*q0+45 5*q0+45]
This specific example is solving moment equilibrium for a monocoque structure.
Is there a way to solve the seperate q0 values so its a vector like [q0_1 q0_2 q0_3] using the symbolic toolbox?
Star Strider 2022년 4월 30일
One solve statement (such as in the original post) also fails in R2022a. One option to get all of the solutions is arrayfun that should be available (another is an explicit loop) —
moment = [5*q0+25 6*q0+45 5*q0+45];
q0 = arrayfun(@(x)solve(x), moment)