How can I get input of function when the output is constant?

1 次查看(过去 30 天)
Hi,
How can I get input of function when the output is constant?
In this function, output = f(input)
output is constant and input should be controlled to match the output.
Thank you.

采纳的回答

Matt J
Matt J 2022-5-5
fzero(@(x)y-f(x), xInitial)
  2 个评论
kkh1897
kkh1897 2022-5-5
how can I apply fzero function when x is vector with more than two values?
Walter Roberson
Walter Roberson 2022-5-5
When it is a vector, do you want to return a scalar output or do you want to return one copy of the constant for each input?
F = @(x) constant * ones(size(x))

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by