Using a symsum inside a fsolve

3 views (last 30 days)
Leonardo Peixoto
Leonardo Peixoto on 2 Aug 2023
Commented: Leonardo Peixoto on 12 Aug 2023
I need to estimate the parameters of a model using the equations of the attached image. From my readings of the matlab documentation I would have to use fsolve to solve that system of non-linear equations, but there is a sum of multiple terms inside the equations. If I understood correctly, I would have to run a Symsum "nested" inside the fsolve. Is that correct? How do I implement this? Any advice is appreciated.
  1 Comment
VBBV
VBBV on 2 Aug 2023

No, you can run symsum separately for the summation terms only. Nested symsum inside a loop may not be necessary.

Sign in to comment.

Answers (1)

Torsten
Torsten on 2 Aug 2023
Edited: Torsten on 2 Aug 2023
If I understood correctly, I would have to run a Symsum "nested" inside the fsolve. Is that correct? How do I implement this?
No, it's not correct. You can either use a for loop to add the terms one by one or use MATLAB's "sum". "symsum" is inadequate because there are no symbolic variables if you use "fsolve".
  11 Comments
Torsten
Torsten on 10 Aug 2023
Maybe you could give a link to the paper you are concerned with so that I know what you are trying to do.
Leonardo Peixoto
Leonardo Peixoto on 12 Aug 2023
Absolutely! The paper I was following initially was this one (https://drive.google.com/file/d/1t5dy3bS_JNDrDye5DH3JNXOMzDbCMhvR/view?usp=drive_link). I found the math a bit confusing and decided to follow this one (https://drive.google.com/file/d/1gUmHCMVZXEBcSW9zEjT8N4tAOAsnjYkg/view?usp=drive_link). Any insight would be greatly appreciated.

Sign in to comment.

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!