how do i solve a system of equasion with mulitple variables

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)

2 Comments

Do you know the value of m1, m2, h1, h2 and v?
no i do not. if i had those values i think i would just be able to set up a matrix to solve right?

Sign in to comment.

 Accepted 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 = 

More Answers (0)

Categories

Find more on Mathematics 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!