How to solve an equation which has another function in it?

1 次查看(过去 30 天)
Hi everyone,
I am trying to solve an equation like
4*x+g(x)=18 where g(x)=2*x+6
meaning that g(x) changes with iterations. I am trying to use solve function, couldn't figure it out.
thanks in advance

采纳的回答

Star Strider
Star Strider 2014-4-18
Not really sure what you want.
Try this:
g = @(x) 2.*x + 6;
f = @(x) 4.*x + g(x) - 18;
s = fzero(f, 1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by