Je dois appeler fsolve avec 11 variables mais pour une raison quelconque, commence à se comporter de manière erratique chaque fois que je lui donne plus de 10. Voici un exemple.Appeler fsolve avec> 10 arguments octave
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
suivie
x0 = [.1;.2;.3;.4;.5;.6;.7;.8;.9;1];
[x, fval, info] = fsolve ("fun", x0)
fonctionne parfaitement. Si je joins
y(11) = x(11) - 11;
à ma fonction et appelle
x0 = [.1;.2;.3;.4;.5;.6;.7;.8;.9;1;1.1];
[x, fval, info] = fsolve ("fun", x0)
Il parcourt plusieurs appels à plaisir (je peux avoir écrire plaisir à consoler chaque fois qu'il est appelé) avant de me donner l'erreur suivante.
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" "[email protected]"
La documentation de fsolve ne limite pas le nombre d'arguments pour autant que je sache. Quelqu'un pourrait-il me dire si c'est un bug, ou si j'ai une mauvaise installation d'octave? En ce moment, j'ai 3.4.0 en cours d'exécution sur Mountain Lion.
Je ne reçois certainement pas votre erreur sur l'octave 3.2.4, 64 bits. – Isaac
ne peut pas reproduire sur Octave 3.6.1 (WinXP) – Amro
Merci à vous deux, j'ai changé les versions et maintenant ça fonctionne très bien. – Hammer