# MATLAB Solving two ODE's Simultaneously using MATLAB

Hi,

I am having trouble writing the code for the following:

The two Dynamic Equilibium Equations for an electric motor are:

dia/dt=(1/La)*(Va-ia*Ra-ea);
dw/dt=(1/J)*(Tem-TL-B*w);

Where:
Ra=0.6;
La=2e-3;
K*Phi=0.076;
TL=0.041893;
B=1e-4;
J=0.0024624;
Va=42;
Tem=K*Phi*ia;
ea=K*Phi*w;
Time span= 5 sec;

How do I write a code that solves these two equations simultaneously? I am required to plot ia and w versus time. I am also required to change the initial conditions and change TL to see how the plots change.

Thanks.

Related Math Software Workshop News on Phys.org

### Want to reply to this thread?

"Solving two ODE's Simultaneously using MATLAB"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving