Info

This question is closed. Reopen it to edit or answer.

Solve() Throwing Error When using Syms

1 view (last 30 days)
Alexander Mault
Alexander Mault on 21 Nov 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello Everyone!
I've run into a strange error and I'm stumped on how to solve it.
I am trying to solve a system two symbolic variables and two equations. The syms are created using
%N is number of terms
for i = 1:N
An(i) = sym(['An',num2str(i)]);
A_sum1 = A_sum1 + An(i);
A_sum2 = A_sum2 + i*An(i);
end
Then I create the equations with
for i = 1:N
eqn(i) = sym(2.5,'d') * A_sum1 + sym(3.3, 'd') *A_sum1;
end
So at this point, I have two unknowns (An(1), An(2)) and two equations (eqn(1), eqn(2)) but when I put it into solver as
Solve(eqn,An)
I get the error "4 equations, and 2 variables. Can not find solution".
Anyone have an idea of what's going on?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!