Using a symsum inside a fsolve
古いコメントを表示
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 件のコメント
VBBV
2023 年 8 月 2 日
No, you can run symsum separately for the summation terms only. Nested symsum inside a loop may not be necessary.
回答 (1 件)
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 件のコメント
Leonardo Peixoto
2023 年 8 月 5 日
Leonardo Peixoto
2023 年 8 月 5 日
Torsten
2023 年 8 月 5 日
Use "mle":
Look at the example "Fit Custom Probability Density Function" to see how to proceed.
x in the example is your data vector. Instead of v and d, you have q, beta and lambda as parameters.
And instead of ncx2rnd, you have your f from above.
Leonardo Peixoto
2023 年 8 月 8 日
Torsten
2023 年 8 月 8 日
We need your code and possibly your data in order to reproduce the error.
Please include as plain ascii and not as graphics.
Torsten
2023 年 8 月 10 日
I cannot tell if it makes sense what you are doing. Usually, one directly takes the raw data to fit the distribution to without preprocessing them as you do.
Leonardo Peixoto
2023 年 8 月 10 日
編集済み: Leonardo Peixoto
2023 年 8 月 10 日
Leonardo Peixoto
2023 年 8 月 10 日
Torsten
2023 年 8 月 10 日
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
2023 年 8 月 12 日
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

