Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
Software
»
comp.softsys.matlab
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
How can I change a variable in a equation when use "solve"?
Replies:
1
Last Post:
Apr 4, 2013 9:20 PM




How can I change a variable in a equation when use "solve"?
Posted:
Apr 4, 2013 6:17 PM


Dear all,
A question about using the solve function. My code is as follows,
syms a x y s = solve('x*exp(x)=y, y=ax','x,y') s = [s.x s.y]
It works when I use a number such as "2" instead of "a" in the equation 'y=ax'. But when I include the variable in the equation, it doesn't go. Since I want to change the "a" value outside the "solve" function, how can I do this?
The matlab version is R2010a.
Many thanks!
Jing



