help-octave
[Top][All Lists]
Advanced

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

Re: re: Matlab Programs with Octave


From: JasonNicholson
Subject: Re: re: Matlab Programs with Octave
Date: Sat, 7 Sep 2013 20:37:24 -0700 (PDT)

I downloaded your code and tried to run it.  It did not work and I received
the same error you did.  I looked at the code and changed lines 48 and 49 in
TuParam:

%SOLVER = 'fminsearch';  % Set SOLVER = 'fminsearch' for ver. 5.3+; 'fmins'
for earlier
SOLVER = 'fsolve';  % for Optimization toolbox.

Now you use fsolve instead of fminsearch.  

However, there is still more errors.  The names of functions was mixed up. 
Octave is case sensitive.  I fixed the calls to TuCalc and Optube.  The last
warning was about the shortcuit convention in MATLAB apparently the
maintainers hate by the way you have to deal with it in octave:

           do_braindead_shortcircuit_evaluation(1)

You can find out more about this here:
http://wiki.octave.org/FAQ#Short-circuit_.26_and_.7C_operators

Now your code runs.  Here are the modified files.

TuParam.m <http://octave.1599824.n4.nabble.com/file/n4657131/TuParam.m>  
TuCalc.m <http://octave.1599824.n4.nabble.com/file/n4657131/TuCalc.m>  
Optube.m <http://octave.1599824.n4.nabble.com/file/n4657131/Optube.m>  



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Matlab-Programs-with-Octave-tp4657118p4657131.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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