Quantcast
Channel: Mein MATLAB Forum - goMatlab.de
Viewing all articles
Browse latest Browse all 28441

Optimtool GA mehrere Ergebnisse anzeigen u zwischenspeichern

$
0
0
Hey! Ich hab deine Tipps gerade ausprobiert. Der erste klappt, beim zweiten hab ich Probleme. Ich hab als output function: function state = outfun(~, ~, state) val1=state.Generation; iter=mod(val1,10); if iter==0 filename = 'test.txt'; fid = fopen(filename, 'w'); fprintf(fid, state.Generation, state.Population,'\n'); fclose(fid); end end Die Funktion soll jede 10 Population in einem textfile speichern. Wenn ich die Optimierung jedoch mit @outfun als output function ausführe, gibt optimtool mir Error running optimization. Too many output arguments aus. Was habe ich falsch gemacht? Grüße, Freddi

Viewing all articles
Browse latest Browse all 28441

Trending Articles