How can I give initial condition as given in following equation?

3 views (last 30 days)
I am getting problem in giving boundary condition for differential equation

Accepted Answer

Birdman
Birdman on 10 Apr 2018
Edited: Birdman on 10 Apr 2018
Try this(requires Symbolic Toolbox):
syms x(t)
eq=diff(x,t)==5*x-3;
initCond=x(2)==1;
X(t)=dsolve(eq,initCond)
  4 Comments

Sign in to comment.

More Answers (1)

Torsten
Torsten on 10 Apr 2018
Take a look at the section
"Solve Differential Equation with Condition"
under
https://de.mathworks.com/help/symbolic/dsolve.html
The first example shows you how to set up your problem.
Best wishes
Torsten.
  1 Comment
Jaydeep Ashtekar
Jaydeep Ashtekar on 10 Apr 2018
Above answer is correct but I want to solve this equation by using Simulink block of integration.There I am not able give the above boundary condition t=2,x=1

Sign in to comment.

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!