I need to call fsolve with 11 variables but for some reason in starts behaving erratically whenever i give it more than 10. Here is an example.
function y = focal_fun (x)
y(1) = x(1) - 1;
y(2) = x(2) - 2;
y(3) = x(3) - 3;
y(4) = x(4) - 4;
y(5) = x(5) - 5;
y(6) = x(6) - 6;
y(7) = x(7) - 7;
y(8) = x(8) - 8;
y(9) = x(9) - 9;
y(10) = x(10) - 10;
endfunction
followed by
x0 = [.1;.2;.3;.4;.5;.6;.7;.8;.9;1];
[x, fval, info] = fsolve ("fun", x0)
works perfectly. If I append
y(11) = x(11) - 11;
to my function and call
x0 = [.1;.2;.3;.4;.5;.6;.7;.8;.9;1;1.1];
[x, fval, info] = fsolve ("fun", x0)
It iterates through several calls to fun (I can have fun write to console every time it is called) before giving me the following error.
dyld: lazy symbol binding failed: Symbol not found: _lsame_
Referenced from: /Applications/Octave.app/Contents/Resources/lib/libqrupdate.1.dylib
Expected in: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
dyld: Symbol not found: _lsame_
Referenced from: /Applications/Octave.app/Contents/Resources/lib/libqrupdate.1.dylib
Expected in: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
panic: Trace/BPT trap: 5 -- stopping myself...
attempting to save variables to octave-core'...
save to `octave-core' complete
/usr/local/bin/octave: line 68: 2620 Trace/BPT trap: 5 OCTAVE_HOME="${OCTAVE_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" FFLAGS="${FFLAGS}" LDFLAGS="${LDFLAGS}" DL_LDFLAGS="${DL_LDFLAGS}" SED="$SED" MAGICK_HOME="${ROOT}" FONTCONFIG_PATH="${ROOT}/etc/fonts" "${ROOT}/bin/octave-3.4.0" "$@"
Documentation for fsolve does not restrict the number of arguments as far as I can tell. Could someone tell me if this is a bug, or I have a bad install of octave? Right now I have 3.4.0 running on Mountain Lion.
Thank you very much Isaac and Amro, I changed my version to 3.2.0 and have no problems. Must have just been a bug with that version.