# MATLAB Solving coupled ode in matlab help

#### cjh12398

Problem: Model the coupled ode system for a motor:
Equations:
dVc/dt=(-1/C)*Il+(1/C)Is
dIl/dt=(1/L)*Vc-(R/L)*Il

I have been given the values of L=1e-3, R=50, Is=10.0A and C is to be designed by trial and error.
I have been able to write out the function, by assigning Vc=x(1) and Il=x(2), and then I wrote dxdt= [dVc/dt;dIl/dt];

But when I have my script, I'm having trouble in how to define the initial conditions. The task says that all currents and voltages are zero at the beginning and I have therefore written that x1=0 and x2=0.

However, when I plot the result, the current value is way lower than what is expected.
I suspect there is a problem in the way I am defining the initial conditions.
Any help would be greatly appreciated.

Related Math Software Workshop News on Phys.org

"Solving coupled ode in matlab help"

### 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