How to solve an equation in terms of the other variable
Show older comments
I have the equation g^2+6*g*h+3h=0 for which I need to solve g in terms of h. Here is my attempt:
syms g h
g = solve('g^2+6*g*h+3*h=0')
For some reason this consistently only solves h in terms of g. Can someone point out to me what I am doing wrong?
Accepted Answer
More Answers (1)
Jeffery Devereux
on 26 Feb 2018
0 votes
you need to use two equal signs
g^2+6*g*h+3*h==0
Categories
Find more on Numeric Solvers 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!