How to extract factors of variables in an equation?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Robert Roos
el 5 de Abr. de 2019
Respondida: Robert Roos
el 24 de Abr. de 2019
I am using the symbolic toolbox to generate a set of three very big equations:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/212254/image.png)
The result should be an equation of motion, so of this form:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/212255/image.png)
Here q, f , τ and N are vectors of three elements and M and C are 3x3.
If I have a variable with the vector 'f', is there a way of find the matrices M and C?
I found the `collect` function, which orders an equation into polynomials with respect to a variable and this can be easily used to manually find those matrices, however, the rest of the equation remains, so it cannot be automated.
Example, say the function is
I want to extract the factors 10, 7 and -1 for the three states respectively as seperate variables.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/212256/image.png)
2 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!