我需要用 11 个变量调用 fsolve,但由于某种原因,每当我给它超过 10 个变量时,它就会开始表现异常。这是一个例子。
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
其次是
x0 = [.1;.2;.3;.4;.5;.6;.7;.8;.9;1];
[x, fval, info] = fsolve ("fun", x0)
完美运行。如果我附加
y(11) = x(11) - 11;
到我的功能和调用
x0 = [.1;.2;.3;.4;.5;.6;.7;.8;.9;1;1.1];
[x, fval, info] = fsolve ("fun", x0)
在给我以下错误之前,它会迭代几次对 fun 的调用(每次调用它时我都可以愉快地写入控制台)。
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" "$@"
据我所知, fsolve 的文档并不限制参数的数量。有人可以告诉我这是一个错误,还是我的八度安装错误?现在我在 Mountain Lion 上运行了 3.4.0。