I'm trying to solve the following steady-state equation for x:
0 = -C + 2*C0*(1-exp(-k*A*x*phi))
I've defined all variables as syms, but can't figure out how to solve the equation for x. Since all other variables are known, I've tried substituting them in:
f = -C + 2*C0*(1-exp(-k*A*x*phi))
subs(f, [C 20], [C0 11], [k .015], [A .031], [phi .01])
But this also doesn't work.
The correct way to replace symbolic variables with values using
subs
is to use the three input variant. The first is the symbolic expression, the second is an array of symbolic variables to replace, and the third is an array of things that you want to replace each variable in the second input with.