fsolve - function with two input arguments

조회 수: 9 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by