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
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!