Using fsolve to solve a system of multi-variable equations
古いコメントを表示
I am trying to solve a system of 4 equations which are summations of Eigenseries. There are 4 variables. The functions/governing equations are actually determine using several inputs which are pre-determined constants using a function. It seems that when I'm trying to use the function handle (@ funk) I am not allowed to put any inputs other than 'x', a vector that contains 4 the variables, into funk. How am I supposed to go around this? I need the equations to be inputs into the function or to somehow use fsolve on 4 equations direction without using a function.
Thank you for your time, Alex.
回答 (2 件)
Torsten
2017 年 2 月 16 日
1 投票
https://de.mathworks.com/help/optim/ug/passing-extra-parameters.html
Best wishes
Torsten.
5 件のコメント
Alex Wylie
2017 年 2 月 16 日
Torsten
2017 年 2 月 16 日
Could you please show us the relevant part of your code ?
Best wishes
Torsten.
Alex Wylie
2017 年 2 月 16 日
Alex Wylie
2017 年 2 月 16 日
Torsten
2017 年 2 月 16 日
fsolve doesn't work with symbolic variables - EQ_1, EQ_2, EQ_3 and EQ_4 must be of type double.
Best wishes
Torsten.
Abdullaziz Al-Farqani
2019 年 4 月 6 日
0 投票
try to define the 4 variables as vectors (x(1),x(2),...) instead of syms: a_i, b_i, c_i and d_i. See if it works
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!