V=[1,2,3,4];A=3;i=1;while i<=4C=A*V(i);syms x y eqn1 = C*x + y == 2;eqn2 = -x + y == 3;sol = solve([eqn1, eqn2], [x, y]);xSol = double(sol.x);ySol = double(sol.y);i=i+1;end
MATLAB: How to save and plot all values of x and y for each value of C? x and y values are in the vertical axis and C in the horizontal axis in the graphic. I need to use the function “solve”
equation systemMATLAB
Best Answer