Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

solving piecewise functions using ode in matlab!!

Status
Not open for further replies.

cedance

Advanced Member level 2
Joined
Oct 24, 2003
Messages
551
Helped
30
Reputation
60
Reaction score
7
Trophy points
1,298
Location
Germany
Activity points
4,622
solving piecewise functions

Hi,

suppose, i define a function f'(t) = t at say [0,1] and f'(t) = t² at (1,4] that is,

f'(t) = t 0<=t<=1
= t² 1<t<=4

i need to find the numerical solution to this differential equation using matlab. Please suggest me how to do this. I couldnt find anything out of the help from matlab.

thanks,
cedance.
 

solving piecewise in matlab

I have just read now your topic.
Well, it is not numerical, but what about Laplace transformation?
And what about if you define the function with the aid of heaviside step function?
e.g.: [0,1] : Heaviside(t)-Heaviside(t-1)
 

solving piecewise functions values

or you write two equations, as you did :).
You know the initial conditions for the first equation, so you can calculate the solution of the first equation. You will get the initial values for the second equation, then you can calculate the second equation and after you can merge the two solution vectors. What about this approach?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top