lkpsanfrancisco.blogg.se

Gnu octave differential algebraic equation solver
Gnu octave differential algebraic equation solver











gnu octave differential algebraic equation solver

% Create f(t) as defined in the question, but vectorised w.r.t. X_cvector = x_cvector(2 : end - 1) % discard outer edges, keep inner only.

gnu octave differential algebraic equation solver

X_cvector = linspace( 0, 1, N + 1 ).' % N+1 edges, including outer ones x = 0 and x = 1), we only care for the 'inner edges', hence we only need to deal with vectors of N-1 elements (hence the size of matrix A). Since you are given the solutions for the 'outer' edges (i.e.

gnu octave differential algebraic equation solver

  • You mentioned a 'bar' of length 1, and N partitions/bins, so I'm assuming X is a vector representing the corresponding positions at the 'edges' of the bins, in which case you have N+1 edges.
  • However, as an example of how to 'run' the lsode function, here's an example below, which makes the following assumption: I'm not an expert, and there's some information you've left out (e.g.













    Gnu octave differential algebraic equation solver