How to solve an equation which has another function in it?
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
Star Strider
on 18 Apr 2014
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 Comments
More Answers (0)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!