How can I solve a system of equations symbolically?
Show older comments
This is the code that I'm trying to run:
clear;
clc;
syms F1 F2 F3 a m x1 x2 x3 L1 L2 L3;
F = [F1; F2; F3];
x = [x1; x2; x3];
b = [L1; L2; L3];
A = [1 2*m 0; a 3*m 1; 1 1 a];
%Solve F=A*x + b for x (x1, x2, x3)
solve('F1 = x1 + 2*m*x2 + L1', 'F2 = a*x1 +3*m*x2 + x3 + L2', 'F3 = x1 + x2 + a*x3', x1, x2, x3)
I'm trying to get it to solve for x1, x2, and x3 as a function fo the other values. Is there even a way to do this or am I trying to do something that MATLAB doesn't have the ability to do? Please help. Thanks!
Oh, the version of MATLAB I'm using is r2011a.
Accepted Answer
More Answers (0)
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!