|
From: | Mike B. |
Subject: | Re: Aux. functions with multiple outputs |
Date: | Tue, 14 Sep 2010 18:47:02 -0700 (PDT) |
Thanks everyone for replying. Here is a specific example: I have a function which returns the objective value and gradient at x. I want to pass both (objective + gradient) to SQP. simple example: function [ f, g ] = myf( x ) f = x^2; g = 2*x; endfunction to use only the objective value (f) I've defined auxf = @(x) myf( x ); [ x1, f1 ] = sqp( 0, auxf ); now I want to pass to sqp also the gradient (as a third argument). Any ideas how to do this? (ideally without defining another aux. function which outputs g only). Thanks, Mike. --- On Sat, 11/9/10, Judd Storrs <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |