fsolve - function with two input arguments

6 ビュー (過去 30 日間)
Ignacij
Ignacij 2020 年 1 月 29 日
回答済み: Ignacij 2020 年 2 月 2 日
Hello!
Is it possible to solve function with two input arguments? I have function in which I input two parameters and it returns one.
Example:
x = function(a,b)
x.JPG
But now i have a problem. I know parameters x and a, how do I get parameter b? Is it even possible?
Thanks for your reply!

採用された回答

Jeff Miller
Jeff Miller 2020 年 1 月 30 日
function b = find_b(knownX, knownA, guessForB)
fun = @(b) pfun2(knownA,b) - knownX;
b = fzero(fun,guessForB);
end
Depending on your pfun2, you may or may not need a guessForB that is close to the right value.

その他の回答 (1 件)

Ignacij
Ignacij 2020 年 2 月 2 日
Thank you!

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by