• Support PF! Buy your school textbooks, materials and every day products via PF Here!

Help in solving a system of ODEs using MATLAB

  • Thread starter jcsolis
  • Start date
Hello, I have been trying to solve this problem and the only thing I got is errors and errors. Also I need to plot y versus t, y' versus t and y' versus y??

1. Homework Statement

The system of ODEs

y1'= y2
y2'= -2y1-0.03y13

The time span is [0:0.1:5]
and there are no initial conditions!

Need to be solved using ODE45 solver



2. Homework Equations

None


3. The Attempt at a Solution

I created this m-file

function yprime = syst1(t, y)
yprime = [y(2); -2*y(1)-0.03*(y(1))^3];

then in the command window

tspan=[0:01:5]
[t y]=oder45 ('syst1', tspan)


and then nothing comes out. I have found many examples of solving systems of ODEs but all of them with initial conditions which is not my case. Can someone explain me waht I am doing wrong?

Than You
 

Want to reply to this thread?

"Help in solving a system of ODEs using MATLAB" You must log in or register to reply here.

Related Threads for: Help in solving a system of ODEs using MATLAB

N
Replies
6
Views
11K
Replies
10
Views
3K
Replies
1
Views
1K
  • Posted
Replies
4
Views
911
Replies
2
Views
5K

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
Top