x+3y=5;2x+4y=4. In general maths, we can be able to find the values of 'x' and 'y' from the above equations. How to find it in MATLAB?
Direct link to this answer:
If you have the Symbolic toolbox,
syms x y
solve(x + 3*y - 5, 2*x + 4*y - 4)
Direct link to this comment:
x: [1x1 sym]
y: [1x1 sym]. this is the answer which i got.. but i want to know the value of x and y.. no values are stored in workspace also
A = [1 3;...
b = [5;...
%Solve Ax=b as A\b
X = A\b
Read more here: http://www.mathworks.com/help/matlab/ref/mldivide.html
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test
Opportunities for recent engineering grads.
New to MATLAB?
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend you select United States from the following list:
See all countries