fsolve - function with two input arguments

6 visualizaciones (últimos 30 días)
Ignacij
Ignacij el 29 de En. de 2020
Respondida: Ignacij el 2 de Feb. de 2020
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!

Respuesta aceptada

Jeff Miller
Jeff Miller el 30 de En. de 2020
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.

Más respuestas (1)

Ignacij
Ignacij el 2 de Feb. de 2020
Thank you!

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by