Finding k* which satisfies the equation

1 回表示 (過去 30 日間)
Mert Demir
Mert Demir 2019 年 1 月 10 日
コメント済み: Mert Demir 2019 年 1 月 10 日
Hello all,
I have a question related to finding k* which needs to be a (1X100) vector which satisfies
k* is such that (1-a)*alpha.*theta.*(k+L)^(alpha-1)-((k.^gamma)./w^(1+gamma))=0
where theta and L is (1X100) vectors that is defined and a, alpha and gamma is a number.
  1 件のコメント
Torsten
Torsten 2019 年 1 月 10 日
help fzero

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

採用された回答

John D'Errico
John D'Errico 2019 年 1 月 10 日
It is a really bad idea to want to call a variable k*, since * represents multiplication in MATLAB. gamma is also a poorchoice of variable name, since the gamma function can be a terribly useful one.
As well, you never tell us what w is. Known? Unknown? Scalar? Vector?
I'll assume that w is just a known scalar. If w is unknown, then there is nothing you can do anyway, since the problem would then be unsolvable.
If I assume that w is known as a scalar (even a known vector of elements of the same size as k, this is still no problem) then your problem reduces to a set of scalar problems. So just loop from 1 to 100. Use fzero to solve each sub-problem in turn. Note that a loop here is not inefficient, since fzero is pretty fast, as well as being fairly robust.
I can't help you much more without having some sample data for this variables. If you attach a .mat file containing them, I can look more carefully at the problem. There may be issues with the domain, such as bracketing the solution.
  1 件のコメント
Mert Demir
Mert Demir 2019 年 1 月 10 日
Thank you for your answer. I forget to tell that w is also vector.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOptimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by