在 MATLAB 中对相似项进行分组
我正在尝试编写一个程序来求解 MATLAB 中的方程组。我想知道是否有办法让 MATLAB 将类似项分组并将它们的系数放入矩阵中?我意识到我可以手动输入系数,但我希望重新利用这个小程序来执行节点分析。
I'm trying to code a program that solves systems of equations in MATLAB. I was wondering if there is a way to get MATLAB to group like terms and put their coefficients into a matrix? I realize that I can just enter the coefficients in by hand but I want to hopefully repurpose this small program to perform nodal analysis.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

您始终可以使用我的 sympoly 工具为您完成大部分工作。由于这套工具可以让您直接访问解析结果,这将使您的生活变得更轻松,并对表达式进行许多符号操作。例如...
在文件交换中查找 sympoly。
You could always use my sympoly tools to do much of the work for you. Since this set of tools will give you direct access to the parsed result, this will make your life easier, as well as do much symbolic manipulation of an expression. For example...
Find sympoly on the file exchange.