100 Equations, 101 Variables, Systems of Equations Shortcuts?
4 次查看(过去 30 天)
显示 更早的评论
I have 100 equations and 101 variables. I'm trying to find all variables as a function of one variable i.e. x = f(t); y = g(t); ......, etc. I already have all the equations on a text file in linear form (i.e. y = x + 3t, etc). I was wondering how I would be able to solve it using one of these two ways: 1) I can make a matrix of coefficents and solve it using one of Matlab's functions. However, a 100x100 matrix means I would have to input 1,000 cells. The possibility of human error is quite high. Is there any function that allows me to translate my already made equations into a matrix of coefficents? 2) About 80 of the equations are 3 variable equations (i.e. x = 10y - 6z), isn't there anything in the symbolic toolbox that allows me to simply start solving them as a function of t without having to go through annoying matrix methods?
0 个评论
回答(1 个)
Walter Roberson
2011-4-27
You can use sym2poly to extract expressions.
To solve as functions of t, use subs() to convert your plain x and y and so on in to x(t), y(t) and so on. Then use solve() or dsolve()
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!