Use workspace variable in equation solver
2 views (last 30 days)
I have the equation x+y=25 and currently I have y as a predfined variable=5. so the equation becomes x+5=25. However I would like to change y from my script and the equation to automatically change based on my y value rather than me modifying my equations each time to edit the y value.
I currently do it this way:
eqn = x+5=25;
S = solve(eqn,x);