How can I get input of function when the output is constant?
3 次查看(过去 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.
0 个评论
采纳的回答
Matt J
2022-5-5
fzero(@(x)y-f(x), xInitial)
2 个评论
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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!