help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error: feval: function 'pkg.m' not found


From: Mike Miller
Subject: Re: error: feval: function 'pkg.m' not found
Date: Fri, 11 Jan 2019 11:53:13 -0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, Jan 11, 2019 at 09:44:30 -0600, ola wrote:
> If I use a random predefined field from optimset() in the program (e.g.
> 'ubound'), everything works, but this field is wrong for this function; if I
> use the function-specific field, the optimset() returns an error: /warning:
> optimset: unrecognized option: posdef/.

A warning is not an error. Does it return a structure you can use
despite the warning? Have you tested this in the Octave interpreter
itself? I don't know much about optimset so I can't help specifically
beyond that.

> one from any function) or can I create in other way a struct of opts('key',
> 'value') from the c++ code level (e.g. using #include <lo-regexp.h>?  What
> is the exact type of octave_struct opts - is it sth like
> std::vector<std::pair&lt;T, T>> or can I call exact octave_struct for opts
> (what is the name) just like I call the octave_struct 'Matrix'?

You can create an Octave struct in C++ from either a C++ std::map or by
using Octave's own octave_map type.

Something like this should work

    std::map<std::string, octave_value> s;
    s["A"] = 1;
    s["B"] = 2;

    octave_value_list args;
    args(0) = s;

If you want specific help about the optimset function and optimization
routines, you might want to start a new thread about your remaining
questions. The original topic here on how to load packages with feval
seems to be solved.

-- 
mike

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]