Solving system of dynamic functions

Hello all,
I've got 'n' dynamic functions with 'n' different parameters, stored in a vector, as can be seen here:
n = 3;
fun1 = @(x) 0;
fun2 = @(x) 0;
fun3 = @(x) 0;
for i = 1:n
fun1 = @(x) fun1(x) + x(i);
fun2 = @(x) fun2(x) + i*x(i);
fun3 = @(x) fun3(x) + x(i) + i;
end
Is it possible to solve the equations for x? I've tried multiple things, but neither of them worked, and my Matlab skills are still limited. :)

6 件のコメント

darova
darova 2019 年 11 月 29 日
Can't see functions. Where are they?
Dick Heijboer
Dick Heijboer 2019 年 11 月 29 日
I meant equations, I'm sorry.
darova
darova 2019 年 11 月 29 日
What is x(i)? Is it a value?
Dick Heijboer
Dick Heijboer 2019 年 11 月 29 日
It is a vector with parameter values stored in them. For n=3 X = [x1,x2,x3]. Those values I try to find. It should be possible because there are also n=3 equations, I think.
darova
darova 2019 年 11 月 29 日
Can you write the equations? Not in the code
Something like
Dick Heijboer
Dick Heijboer 2019 年 11 月 29 日
The length of the equations are dependent n; thats why the equations are in the for-loop. Thats why its written this way. (This script is a simplification of a larger, complexer script.)

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

質問済み:

2019 年 11 月 29 日

コメント済み:

2019 年 11 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by