help-octave
[Top][All Lists]
Advanced

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

Re: optimset & setfield


From: Etienne Grossmann
Subject: Re: optimset & setfield
Date: Tue, 30 Sep 2003 17:50:10 +0100
User-agent: Mutt/1.3.28i

  Hi Nathan,

no, I was not grinning at all. My advice : use octave-forge! Look :
======================================================================
octave:40> optimset ('Display','off')
ans =
{
  Display = off
}
======================================================================

  it works.

  Now for semantics : what does optimset('Display','off') do?
Probably, it just tells the minimization function (e.g. fminunc or
whatever) to run quietly (do 'help optimset' in Matlab to know for
sure). In that case, you may erase it out of the code.

  Hth,

  Etienne


On Tue, Sep 30, 2003 at 05:56:04PM +0200, Nathan Weisz wrote:
# Hi Etienne, 
# 
# thanks for the quick response.  
# 
# # I should add : good luck! 
# # 
#  
# I can imagine the large grin on your face :-) 
# Will need a holiday if I'll ever manage to get this stuff running. 
# 
# 
# # 1) optimset() of matlab and optimset() of octave-forge only have a 
# #    superficial resemblance. 
# # 2) You'd better use the whole octave-forge package (not just 
# #    optimset). It already has setfield(). 
# # 
#  
# Followed your advice and downloaded the entire octave-forge package. 
# However I do still have some problems on a very basic level. The 
# optimset-call from Hansens program is: 
#       optimset('Display','off'),s,beta,xi); 
# where s, beta and xi are matrices. 
# 
# Now I get following error: 
#       error: setfield: called with odd number of arguments 
# 
# Looking at your optimset-code it says on line 44: 
#       opt = setfield (); 
# This probably is interpreted as nargin = 0. 
# rem(0,2) --> ans = 0 
# 
# In setfield.m stands: 
#       if rem(nargin,2) != 1, 
#         error('setfield: called with odd number of arguments\n') ;  
#       endif 
# 
# So I am wondering whether line 44 of optimset can be correct 
# (regardless of Matlab-compatibility), or whether I'm simply using it in 
# a wrong fashion. 
# 
# All the best, 
# 
# Nathan
# 

-- 
Etienne Grossmann ------ http://www.isr.ist.utl.pt/~etienne



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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