Solving a set of eqns in Matlab??

Status
Not open for further replies.

lucy123

Junior Member level 2
Joined
Mar 17, 2011
Messages
20
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Visit site
Activity points
1,401
Hi I am trying to solve the following equations using Matlab for C1, C2, C3 and C4. In real fact I only require C1.

Code:
C1-C2-C3-1=0
n*C2+C3/n+(d-1)*C4=0
C1+b*C2-b*C3-1=0 
b*n*C2-b*C3/n-C4(1+d)=0

This is what I have input in Matlab but it seems its getting stuck because of the symbolic expresssion??

Any help please?

Code:
syms C1 C2 C3 C4 g L g_0 dL
n=exp(-g*L)
d=exp(-2*g_0*dL)
solve(C1-C2-C3-1, n*C2+C3/n+(d-1)*C4, C1+b*C2-b*C3-1, b*n*C2-b*C3/n-C4(1+d), C1)
 

It's a simple linear system of 4 equations, 4 unknown. It could be solved easily, even if the process is quite tedious.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…