[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems in using "ode45" to replace Matalb's "ode113"
From: |
Sebastian Schöps |
Subject: |
Re: Problems in using "ode45" to replace Matalb's "ode113" |
Date: |
Sat, 9 Jun 2018 10:29:26 -0700 (MST) |
rimolar wrote
> [t,y]=ode113(@solar01,tsol.*365.25.*24.*3600,YINIT,options);
>
> But the following error was displayed:
>
> starting_stepsize: operator /: nonconformant arguments (op1 is 1x1, op2 is
> 1x60)
> starting_stepsize at line 72 column 8
> ode45 at line 192 column 25
> solve_solar_system at line 185 column 5
> run_solar_system at line 71 column 24
>
> Are something missing in the command "ode45" arguments to make it work?
The vector "AbsTol" is defined in the code as a 1x60 matrix and octave
cannot handle this. Octave expects a 60x1 vector for the tolerances. This is
a bug and I would kindly ask you to report it at savannah [1] such that it
can be fixed.
However, you can mitigate your problem for now by transposing AbsTol in line
178, i.e.
options=odeset('RelTol',1e-6,'AbsTol',AbsTol','OutputFcn',@myplotfun);
should work.
Sebastian
[1] https://savannah.gnu.org/bugs/?group=octave
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html