Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8840679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:31:04+00:00 2026-06-14T10:31:04+00:00

For the context, I’m trying to model and simulate a spatiotemporal neural network in

  • 0

For the context, I’m trying to model and simulate a spatiotemporal neural network in Matlab. I’ve determined a differential equation that will represent the dynamics of my neurons.

Now, I want this differential equation to be solved “continuously”, meaning that my simulation should be running, doing some stuff, and in the meantime my neurons should update according to the differential equation.

For the moment, I have two approaches:

Firstly, I could do something like this:

ode45(@diffEquation, [0, inf], nn.U); % where nn.U is the initial (usually randomized) neuron state

function dUdt = diffEquation(t,U)
   nn.U = U;
   dUdt = % the equation
end

So the idea is to start a parallel task in the background that will run ode45 infinitely and directly update my neuron state nn.U. However, as I know ode45 usually stores a “history” of values for each tand returns those values when the calculation is done (eg t is at TFINAL). I’m not interested in those values and I expect that by running ode45 this way, I will run out of memory soon.

The other idea is to just call ode45 over and over, infinitely (also in an async background task):

while 1 % i.e. simulation not over yet
    [~,y] = ode45(@diffEquation, [0, 0.001], nn.U);
    nn.U = y(end,:); 
end

This, like the first approach, seems extremely clumsy and awkward for me.
I’ve got the feeling that there must be a more elegant solution to my problem.

Maybe ode45 is not the right choice here?

EDIT: Just to clarify, the diff. equation is an ordinary equation over time, nothing fancy and solvable by ode45 (ie dUdt = -U + some-stuff * networkoutput)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:31:06+00:00Added an answer on June 14, 2026 at 10:31 am

    If your ode is simple enough. you could provide and analytical solution and dispense with odesolve. In any case. you want to run a simulation, solving the ode in virtual time. Simulink might be a better choice for this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

CONTEXT: I'm currently developing a website that will involve Credit Card numbers handling. Confidential
Context I am trying to understand the internals of a big, hairy JavaScript library.
Context: I'm building a little site that reads an rss feed, and updates/checks the
Context I'm building a persistence layer to abstract different types of databases that I'll
Context: I'm trying to improve the values returned by the iPhone CLLocationManager, although this
Context: I setup a photo upload that uses an iframe to upload the image,
Context I realized that in Twitter , the profile page is displayed in different
(context)I have information from a bunch of elements that I'm collecting into a JSON
Context: I have a text field in my form that is meant for entering
Context: The structure of the code is that a WCF service (server-size) talks to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.