Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Embedded functionfor ODE45

Subject: Embedded functionfor ODE45

From: Faraz Afzal

Date: 8 Mar, 2009 00:07:02

Message: 1 of 1

Hello all,

Is there anyone who could tell me if it is possible to setup two functions within same *.m file..

well I have two Differential equations (made up of All matrices, eq. one riccati and eq. second a special case of riccati)...

Now is that possible that i should call both of them using one ode45 solver in command line such that both evaluated at the same time.....Just to end ur curiosity i need to solve riccati for a variable in certain time 0 to 2 sec.. and solution calculated at every instant must be an input to the special case of riccati (which i want to embedd within first function) and a for loop that goes back again within function and calculates variable at next instant and use it to calculate the special case riccati and so on..

 I was reading BALLODE demo at someones advice but it could not help.. i tried to understand it by reading several times but could not helped to make my solution with its help...
any idea???


Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us