S11(1) = -((1/((RklS1+R11)*C11)) + (1/((R12+R15)*C11)) + (1/((R14+R43)*C11)) + (1/((R13+R24)*C11)) ) ; S11(2) = (1/((R12+R15)*C11)) ; S11(3) = 0 ; S12(1) = (1/((R13+R24)*C11)) ; S12(2) = 0 ; S12(3) = 0 ; S13(1) = 0 ; S13(2) = 0 ; S13(3) = 0 ; S14(1) = (1/((R14+R43)*C11)) ; S14(2) = 0 ; S14(3) = 0 ; % --- 2 ----- S15(1) = (1/((R12+R15)*C12)) ; S15(2) = -((1/((R12+R15)*C12)) + (1/((R19+R16)*C12)) + (1/((R17+R28)*C12)) + (1/((R18+R47)*C12)) ) ; S15(3) = (1/((R19+R16)*C12)) ; S16(1) = 0 ; S16(2) = (1/((R17+R28)*C12)) ; S16(3) = 0 ; S17(1) = 0 ; S17(2) = 0 ; S17(3) = 0 ; S18(1) = 0 ; S18(2) = (1/((R18+R47)*C12)) ; S18(3) = 0 ; % --- 3 ----- S19(1) = 0 ; S19(2) = (1/((R19+R16)*C13)) ; S19(3) = -((1/((R19+R16)*C13)) + (1/((R110+Rkl1)*C13)) + (1/((R111+R212)*C13)) + (1/((R112+R411)*C13)) ) ; S110(1) = 0 ; S110(2) = 0 ; S110(3) = (1/((R111+R212)*C13)) ; S111(1) = 0 ; S111(2) = 0 ; S111(3) = 0 ; S112(1) = 0 ; S112(2) = 0 ; S112(3) = (1/((R112+R411)*C13)) ; % 2 S21(1) = (1/((R24+R13)*C21)) ; S21(2) = 0 ; S21(3) = 0 ; S22(1) = -((1/((RklS2+R21)*C21)) + (1/((R22+R25)*C21)) + (1/((R24+R13)*C21)) + (1/((R23+R34)*C21)) ) ; S22(2) = (1/((R22+R25)*C21)) ; S22(3) = 0 ; S23(1) = (1/((R23+R34)*C21)) ; S23(2) = 0 ; S23(3) = 0 ; S24(1) = 0 ; S24(2) = 0 ; S24(3) = 0 ; % --- 2 ----- S25(1) = 0 ; S25(2) = (1/((R28+R17)*C22)) ; S25(3) = 0 ; S26(1) = (1/((R22+R25)*C22)) ; S26(2) = -((1/((R22+R25)*C22)) + (1/((R29+R26)*C22)) + (1/((R27+R38)*C22)) + (1/((R28+R17)*C22)) ) ; S26(3) = (1/((R29+R26)*C22)) ; S27(1) = 0 ; S27(2) = (1/((R27+R38)*C22)) ; S27(3) = 0 ; S28(1) = 0 ; S28(2) = 0 ; S28(3) = 0 ; % --- 3 ----- S29(1) = 0 ; S29(2) = 0 ; S29(3) = (1/((R212+R111)*C23)) ; S210(1) = 0 ; S210(2) = (1/((R29+R26)*C23)) ; S210(3) = -((1/((R29+R26)*C23)) + (1/((R210+Rkl2)*C23)) + (1/((R211+R312)*C23)) + (1/((R212+R111)*C23)) ) ; S211(1) = 0 ; S211(2) = 0 ; S211(3) = (1/((R211+R312)*C23)) ; S212(1) = 0 ; S212(2) = 0 ; S212(3) = 0 ; % 3 S31(1) = 0 ; S31(2) = 0 ; S31(3) = 0 ; S32(1) = (1/((R23+R34)*C31)) ; S32(2) = 0 ; S32(3) = 0 ; S33(1) = -((1/((RklS3+R31)*C31)) + (1/((R32+R35)*C31)) + (1/((R44+R33)*C31)) + (1/((R23+R34)*C31)) ) ; S33(2) = (1/((R32+R35)*C31)) ; S33(3) = 0 ; S34(1) = (1/((R44+R33)*C31)) ; S34(2) = 0 ; S34(3) = 0 ; % --- 2 ----- S35(1) = 0 ; S35(2) = 0 ; S35(3) = 0 ; S36(1) = 0 ; S36(2) = (1/((R38+R27)*C32)) ; S36(3) = 0 ; S37(1) = (1/((R32+R35)*C32)) ; S37(2) = -((1/((R32+R35)*C32)) + (1/((R39+R36)*C32)) + (1/((R37+R48)*C32)) + (1/((R38+R27)*C32)) ) ; S37(3) = (1/((R39+R36)*C32)) ; S38(1) = 0 ; S38(2) = (1/((R37+R48)*C32)) ; S38(3) = 0 ; % --- 3 ----- S39(1) = 0 ; S39(2) = 0 ; S39(3) = 0 ; S310(1) = 0 ; S310(2) = 0 ; S310(3) = (1/((R312+R211)*C33)) ; S311(1) = 0 ; S311(2) = (1/((R39+R36)*C33)) ; S311(3) = -((1/((R39+R36)*C33)) + (1/((R310+Rkl3)*C33)) + (1/((R311+R412)*C33)) + (1/((R312+R211)*C33)) ) ; S312(1) = 0 ; S312(2) = 0 ; S312(3) = (1/((R311+R412)*C33)) ; % 4 S41(1) = (1/((R43+R14)*C41)) ; S41(2) = 0 ; S41(3) = 0 ; S42(1) = 0 ; S42(2) = 0 ; S42(3) = 0 ; S43(1) = (1/((R44+R33)*C41)) ; S43(2) = 0 ; S43(3) = 0 ; S44(1) = -((1/((RklS4+R41)*C41)) + (1/((R42+R45)*C41)) + (1/((R44+R33)*C41)) + (1/((R43+R14)*C41)) ) ; S44(2) = (1/((R42+R45)*C41)) ; S44(3) = 0 ; % --- 2 ----- S45(1) = 0 ; S45(2) = (1/((R47+R18)*C42)) ; S45(3) = 0 ; S46(1) = 0 ; S46(2) = 0 ; S46(3) = 0 ; S47(1) = 0 ; S47(2) = (1/((R48+R37)*C42)) ; S47(3) = 0 ; S48(1) = (1/((R42+R45)*C42)) ; S48(2) = -((1/((R42+R45)*C42)) + (1/((R49+R46)*C42)) + (1/((R47+R18)*C42)) + (1/((R48+R37)*C42)) ) ; S48(3) = (1/((R49+R46)*C42)) ; % --- 3 ----- S49(1) = 0 ; S49(2) = 0 ; S49(3) = (1/((R411+R112)*C43)) ; S410(1) = 0 ; S410(2) = 0 ; S410(3) = 0 ; S411(1) = 0 ; S411(2) = 0 ; S411(3) = (1/((R412+R311)*C43)) ; S412(1) = 0 ; S412(2) = (1/((R49+R46)*C43)) ; S412(3) = -((1/((R49+R46)*C43)) + (1/((R410+Rkl4)*C43)) + (1/((R412+R311)*C43)) + (1/((R411+R112)*C43)) ) ; NG11 = (1/((RklS1 + R11)*CN1)) ; NG12 = -( NG11 ) ; NG21 = (1/((RklS2 + R21)*CN2)) ; NG22 = -( NG21 ) ; NG31 = (1/((RklS3 + R31)*CN3)) ; NG32 = -( NG31 ) ; NG41 = (1/((RklS4 + R41)*CN4)) ; NG42 = -( NG41 ) ; S_1 = 1/ (C11 *( RklS1 + R11 )) ; S_2 = 1/ (C21 *( RklS2 + R21 )) ; S_3 = 1/ (C31 *( RklS3 + R31 )) ; S_4 = 1/ (C41 *( RklS4 + R41 )) ; yp = [ S11(1)*y(1) + S11(2)*y(2) + S11(3)*y(3) + S12(1)*y(4) + S12(2)*y(5) + S12(3)*y(6) + S13(1)*y(7) + S13(2)*y(8) + S13(3)*y(9) + S14(1)*y(10) + S14(2)*y(11) + S14(3)*y(12) + S_1*y(13) + 0 + 0 + 0 + 0 S15(1)*y(1) + S15(2)*y(2) + S15(3)*y(3) + S16(1)*y(4) + S16(2)*y(5) + S16(3)*y(6) + S17(1)*y(7) + S17(2)*y(8) + S17(3)*y(9) + S18(1)*y(10) + S18(2)*y(11) + S18(3)*y(12) + 0 + 0 + 0 + 0 + 0 S19(1)*y(1) + S19(2)*y(2) + S19(3)*y(3) + S110(1)*y(4) + S110(2)*y(5) + S110(3)*y(6) + S111(1)*y(7) + S111(2)*y(8) + S111(3)*y(9) + S112(1)*y(10) + S112(2)*y(11) + S112(3)*y(12) + 0 + 0 + 0 + 0 + 0 S21(1)*y(1) + S21(2)*y(2) + S21(3)*y(3) + S22(1)*y(4) + S22(2)*y(5) + S22(3)*y(6) + S23(1)*y(7) + S23(2)*y(8) + S23(3)*y(9) + S24(1)*y(10) + S24(2)*y(11) + S24(3)*y(12) + 0 + S_2*y(14) + 0 + 0 + 0 S25(1)*y(1) + S25(2)*y(2) + S25(3)*y(3) + S26(1)*y(4) + S26(2)*y(5) + S26(3)*y(6) + S27(1)*y(7) + S27(2)*y(8) + S27(3)*y(9) + S28(1)*y(10) + S28(2)*y(11) + S28(3)*y(12) + 0 + 0 + 0 + 0 + 0 S29(1)*y(1) + S29(2)*y(2) + S29(3)*y(3) + S210(1)*y(4) + S210(2)*y(5) + S210(3)*y(6) + S211(1)*y(7) + S211(2)*y(8) + S211(3)*y(9) + S212(1)*y(10) + S212(2)*y(11) + S212(3)*y(12) + 0 + 0 + 0 + 0 + 0 S31(1)*y(1) + S31(2)*y(2) + S31(3)*y(3) + S32(1)*y(4) + S32(2)*y(5) + S32(3)*y(6) + S33(1)*y(7) + S33(2)*y(8) + S33(3)*y(9) + S34(1)*y(10) + S34(2)*y(11) + S34(3)*y(12) + 0 + 0 + S_3*y(15) + 0 + 0 S35(1)*y(1) + S35(2)*y(2) + S35(3)*y(3) + S36(1)*y(4) + S36(2)*y(5) + S36(3)*y(6) + S37(1)*y(7) + S37(2)*y(8) + S37(3)*y(9) + S38(1)*y(10) + S38(2)*y(11) + S38(3)*y(12) + 0 + 0 + 0 + 0 + 0 S39(1)*y(1) + S39(2)*y(2) + S39(3)*y(3) + S310(1)*y(4) + S310(2)*y(5) + S310(3)*y(6) + S311(1)*y(7) + S311(2)*y(8) + S311(3)*y(9) + S312(1)*y(10) + S312(2)*y(11) + S312(3)*y(12) + 0 + 0 + 0 + 0 + 0 S41(1)*y(1) + S41(2)*y(2) + S41(3)*y(3) + S42(1)*y(4) + S42(2)*y(5) + S42(3)*y(6) + S43(1)*y(7) + S43(2)*y(8) + S43(3)*y(9) + S44(1)*y(10) + S44(2)*y(11) + S44(3)*y(12) + 0 + 0 + 0 + S_4*y(16) + 0 S45(1)*y(1) + S45(2)*y(2) + S45(3)*y(3) + S46(1)*y(4) + S46(2)*y(5) + S46(3)*y(6) + S47(1)*y(7) + S47(2)*y(8) + S47(3)*y(9) + S48(1)*y(10) + S48(2)*y(11) + S48(3)*y(12) + 0 + 0 + 0 + 0 + 0 S49(1)*y(1) + S49(2)*y(2) + S49(3)*y(3) + S410(1)*y(4) + S410(2)*y(5) + S410(3)*y(6) + S411(1)*y(7) + S411(2)*y(8) + S411(3)*y(9) + S412(1)*y(10) + S412(2)*y(11) + S412(3)*y(12) + 0 + 0 + 0 + 0 + 0 NG11*y(1) + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + NG12*y(13) + 0 + 0 + 0 + (q1/CN1) 0 + 0 + 0 + NG21*y(4) + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + NG22*y(14) + 0 + 0 + (q2/CN2) 0 + 0 + 0 + 0 + 0 + 0 + NG31*y(7) + 0 + 0 + 0 + 0 + 0 + 0 + 0 + NG32*y(15)+ 0 + (q3/CN3) 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + NG41*y(10) + 0 + 0 + 0 + 0 + 0 + NG42*y(16) + (q4/CN4) ] ;