1

is it possible to solve below equation in matlab?

A*X+B*exp(X)=C

A, B are square and constant matrices. C is a constant and column matrix. X is a column matrix which should be found.( exp() acts element by element on X).

Mr. Nobody
  • 327
  • 2
  • 8
  • 21
  • Symbolic toolbox available? Then try http://www.mathworks.com/help/symbolic/solve.html. You need to initialize the sym X with correct size, otherwise it will fail: `X=sym('X',size(C))` – Daniel Feb 08 '15 at 15:12
  • yes. it is available. i solved it by fsolve. – Mr. Nobody Feb 08 '15 at 15:46

1 Answers1

2

If you are looking for a numeric method, you might want to try fsolve

X = fsolve( @(x) A*x + B*exp(x) - C, x0 );

Due to the non-linear nature of the problem you need to provide an initial guess x0 - the quality of which can affect the performance of the solver.

Shai
  • 111,146
  • 38
  • 238
  • 371
  • 1
    @iliailiaey Then please mark the answer as accepted (green checkmark at the top of the answer). Thanks! – Benoit_11 Feb 08 '15 at 22:20