How to add/specify range of values for each variable in vpasolve?
5 views (last 30 days)
Show older comments
How do I add specific ranges for each variables in vpasolve?
Example, for variable x, range of values should be 1 to 2. For variable y, range is 10 to 100. For variable z, range is 0 to 1.
Part of my code is given below.
syms x y z positive
eq1 =
eq2 =
eq3 =
sol=solve([eq1,eq2,eq3],[x,y,z]);
xsol=vpa(sol.x)
ysol=vpa(sol.y)
zsol=vpa(sol.z)
I tried the following below
syms x y z positive
eq1 =
eq2 =
eq3 =
range=[1 2; 10 100; 0 1]
sol=solve([eq1,eq2,eq3],[x,y,z],range);
xsol=vpa(sol.x)
ysol=vpa(sol.y)
zsol=vpa(sol.z)
but I got an error for the line "range=[1 2; 10 100; 0 1]"
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters.
2 Comments
Answers (1)
See Also
Categories
Find more on Symbolic Math Toolbox 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!