How can I do numerical simulation in Matlab?
이전 댓글 표시
Hi, I'm trying to do numerical simulation in Matlab. I have a system of 5 non-linear equation and 5 unknowns. All the unknowns are time-dependent. I'd like to simulate the solution for the unknowns within a time range.
C1(t)=Cb-2i1(t)*sqrt(t/K)
i1(t)=K(C1(t))*exp(-E(t))
C2(t)=Cb-2i2(t)*sqrt(t/K)
i2(t)=K(C2(t))*exp(-E(t))
i1(t)+i2(t)=constant.
I'd like to simulate this system of equations for a time range. I have tried using fsolve and the for loop..but haven't gone anywhere. I'm not really that familiar with the language of Matlab. I know just enough. Any helpful suggestions/hints or any codes dealing with similar systems would be very helpful. Thanks!
채택된 답변
추가 답변 (1개)
Babak
2012년 8월 7일
0 개 추천
I would do it in Simulink!
For example for the first two equations, you can create signals named C1(t), i1(t) and E(t) and try to use Simulink blocks (can include a MATLAB fcn block in Simulink too) to connect these signals to each other and make a model which does the calcs you want.
I believe the solution of the 3rd and 4th equations will be easy when you have the solution for the C1(t) and i1(t) using the 5th eqn.
카테고리
도움말 센터 및 File Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!