How can I do numerical simulation in Matlab?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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!
0 comentarios
Respuesta aceptada
Alvin sahroni
el 7 de Ag. de 2012
If you want to solve non linear problem probably you should using nonlinear numerical method that have been reserved by several person on "exchange files" try to find it first, cause I think I've had seen it previous time
0 comentarios
Más respuestas (1)
Babak
el 7 de Ag. de 2012
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.
0 comentarios
Ver también
Categorías
Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!