Borrar filtros
Borrar filtros

fmincon help to finde a value for x that make the difference as close to zero as possible

1 visualización (últimos 30 días)
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
f_afvi = sum(f_afvigelse) ;
J = f_afvi

Respuestas (0)


Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by