fmincon help to finde a value for x that make the difference as close to zero as possible
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi i want the difference between F_experiment and F_numerisk be close to zero by using fmincon
function [J] = functest(x);
F_experiment =[1.2;1.8;2.2;2.8;3.2;3.8];
F_numerisk =[1.39200855109546;1.39281818487934;4.87073717626988;4.87384327614117;5.24597805869986;9.35466689738964;10.2424063575844;10.3088174008634;15.0587612254823;16.5529598630734;16.9515500154499;19.7694016673459;21.1084277255124;22.3051621717863;22.4078368670210;22.9697843089879;23.0231310886450;23.1898460773536]-x;
for i =1:length(F_numerisk)
f_afvigelse(i) = abs((F_experiment(i)-F_numerisk(i))/F_numerisk(i)) ; % procent afvigelse
end
f_afvi = sum(f_afvigelse) ;
J = f_afvi
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!