Thanks Olaf
The documentation actually states that that those must be column vectors,
see
https://octave.sourceforge.io/optim/function/fmincon.htmlI have now made sure that mine are column vectors but I still get same
message, therefore I have changed my code to use nonlin_min, but I want to
maintain Matlab compatibility to avoid two sets of code. I am new at Octave
and I love Octave.
And to be complete, I use Octave 5.2 on Win10 and optim is version 1.6.0.
Steph
-----Original Message-----
From: Olaf Till <
[hidden email]>
Sent: Saturday, 15 February 2020 12:54
To:
[hidden email]
Cc:
[hidden email]
Subject: Re: PACKAGE OPTIM - fmincon
On Fri, Feb 14, 2020 at 01:55:49PM +0200,
[hidden email] wrote:
> I have the following function works in Matlab, but not in Octave, the
> error message is
>
> error: lbound: wrong dimensions
>
> error: called from
>
> __apply_param_config_vectors__ at line 37 column 11
>
> fmincon at line 311 column 5
>
> I have tried transpose of lower bound, i.e. x0_lb = [-100,0]' but then
> same message, except that upper bound now has wrong dimension, then I
> took transpose of X0_ub and message reverts back to lower bound has
> wrong dimension.
The 'fmincon' in Octaves optim package requires x0, x0_lb, and x0_ub to be
column vectors. This is probably a bug, since Matlabs 'fmincon'
seems to accept arbitrary arrays at least for x0. You may want to file a bug
report so I don't forget to deal with the issue.
Olaf
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net