MATLAB Answers

Solving coupled equations in Matlab

33 views (last 30 days)
Pavan Kumar
Pavan Kumar on 29 Jan 2015
Answered: Taimur Zaman on 5 Oct 2018
Hii Friend,
I have set of coupled differential equations which i need to solve and plot using matlab.
I am confused on how to proceed.Do suggest me on how to proceed with it.
The final out needed is a plot of abs(B(1)) Versus delk versus Z as shown in the pic.

  0 Comments

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 29 Jan 2015
See the documentation on Ordinary Differential Equations.
First, follow the documentation and write your ODE function, then use the appropriate ODE solver (try ode45 first) to integrate it. If you have problems, describe them, completely copying and pasting any error messages that occur, and attach your script and your ODE function files. We will do our best to help you get your code running if you need our help.

  15 Comments

Star Strider
Star Strider on 3 Feb 2015
My pleasure.
I would be interested in knowing how you solved the problem. I do not have sufficient understanding of the process you are modeling in your ODE to suggest a solution.
Pavan Kumar
Pavan Kumar on 9 Feb 2015
Hii..Sorry for the belated reply.
I followed the following way
Delk=[1:20];
for i=1:20
delk=Delk(i)
[Z1,B] = ode45(@(t,x)DFG789(t,x,delk),[0 3],[(0.1) 0 1]);
Z1_complete(i,:,:)=Z1(:,:);
end
:)
Star Strider
Star Strider on 9 Feb 2015
No worries!
Thank you for following up.
I was curious as to how you incorporated the vector into your ODE function, as much to satisfy my curiosity as to help anyone else who searches for your Question with the same problem.

Sign in to comment.

More Answers (1)

Taimur Zaman
Taimur Zaman on 5 Oct 2018
https://sites.google.com/site/srcombexp/home/matlab-script-help/solution-to-multiple-couples-non-linear-equations

  0 Comments

Sign in to comment.


Translated by