|
From: | Rik |
Subject: | Re: Help with odeset() |
Date: | Sun, 16 Oct 2016 10:29:30 -0700 |
On 10/16/2016 08:56 AM, Matteo Frigo
wrote:
These are the outputs on r2016a: x = odeset ('reltol', 1e-1) x = AbsTol: [] BDF: [] Events: [] InitialStep: [] Jacobian: [] JConstant: [] JPattern: [] Mass: [] MassSingular: [] MaxOrder: [] MaxStep: [] NonNegative: [] NormControl: [] OutputFcn: [] OutputSel: [] Refine: [] RelTol: 0.1000 Stats: [] Vectorized: [] MStateDependence: [] MvPattern: [] InitialSlope: [] ___________________ y = odeset ('RelTal', 1e-2) Error using odeset (line 225) Unrecognized property name 'RelTal'. __________________ z = odeset ('Rel', 1e-3) z = AbsTol: [] BDF: [] Events: [] InitialStep: [] Jacobian: [] JConstant: [] JPattern: [] Mass: [] Thanks Matteo and Parsiad for testing this code.MassSingular: [] MaxOrder: [] MaxStep: [] NonNegative: [] NormControl: [] OutputFcn: [] OutputSel: [] Refine: [] RelTol: 1.0000e-03 Stats: [] Vectorized: [] MStateDependence: [] MvPattern: [] InitialSlope: [] _______________________ w = odeset ('MyCustomProperty', 1) Error using odeset (line 225) Unrecognized property name 'MyCustomProperty'. I filed a bug report about Octave not implementing non-exact match to property names (https://savannah.gnu.org/bugs/index.php?49364). Quoting from that report, ---- Quote --- In Matlab, odeset will match a partial property name to the exact
property name. Octave does not do this. Instead, it creates a new
property under the abbreviated name.
This is a problem. Code on Matlab which makes use of this feature
does not generate any warning, therefore, there is no indication
that the option should be written more specifically. When this
code is ported to Octave, it will run, but different results will
be obtained because some options have not been set identically. As
an example,
will set RelTol to a very strict 1e-12 in Matlab, but leave it at
the default value in Octave. --Rik |
[Prev in Thread] | Current Thread | [Next in Thread] |