MATLAB: How do i solve a system of equasion with mulitple variables

algebrasystem of equations

Im trying to solve this for c1 c3 and c4
equ1: m1*c1=m2*c2
equ2: v = c3*(h1+h2)+c4
equ3: c1*h1=c3*h1+c4
im not sure if this code i wrote is even close to correct any help is appreciated.
syms c1 c3 c4 m1 m2 h1 h2 v
equ1 = m2*c3/m1;
equ2 = (v-c4)/(h1+h2);
equ3 = c1*h1-c3*h1;
sol = solve(equ1,equ2,equ3)

Best Answer

syms c1 c3 c4 m1 m2 h1 h2 v
equ1 = c1==m2*c3/m1;
equ2 = c3==(v-c4)/(h1+h2);
equ3 = c4==c1*h1-c3*h1;
sol = solve([equ1,equ2,equ3],[c1,c3,c4]);
c1=sol.c1,c3=sol.c3,c4=sol.c4
c1 = 
c3 = 
c4 = 
Related Question