Is there a way to substitute a set of variables to become a new variable?
3 views (last 30 days)
Show older comments
Hi experts. I really need help here. I want to substitute R = P*a*b/2*k in my Equation_1 and Equation_2. However, the subs function only can change as single variable. I dont know how to do this. Thank you!
This is my script:
alpha_1 = 2*v1/l
alpha_2 = 2*v2/l
L1 = 0.5*P*V^2*a*b*l*alpha_1
L2 = 0.5*P*V^2*a*b*l*alpha_2
Equation_1 = (k*(v1-v2)*(l/2)) == (L1*l/4)
Equation_2 = (k*(2*v2-v1)*(l/2)) == (L2*l/4)
here I want to do the substitution as R = R = P*a*b/2*k in my Equation_1 and Equation_2
5 Comments
dpb
on 6 Aug 2022
Doesn't show the problem -- but you didn't use R after you defined it so it has no bearing/effect...
It dawned on me later this is trying to do something with the symbolic TB -- I don't have it and have no experience trying to use it -- I was thinking only about numerical solution to the system.
If that's the end result wanted, then backslash should get you there; if you really need something symbolic somebody else will have to help; I simply don't know enough about it to even comment further.
See Also
Categories
Find more on Number Theory in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!