https://gitlab.pks.mpg.de/mesoscopic-physics-of-life/frap_theory
Raw File
Tip revision: 2c4a972a380df7f9e86ddbbf0ae921443ce0800f authored by Lars Hubatsch on 26 October 2021, 13:21:39 UTC
Introduce second reaction rate parameter.
Tip revision: 2c4a972
to_min_theory.m
function [cost, v_fit] = to_min_theory(r_n, t, x_fit, reference)
% TO_MIN_THEORY Takes reference simulation and tries to find simulation 
% that fits total intensity recovery. Uses the full model, including bulk.
    T = Ternary_model(2, 'FRAP', [-1, 0.001, 0.5, 0.4, x_fit(1), x_fit(2), 40], t, 1);
    T.solve_tern_frap();
    v_fit = T.sol(:, 1:100);
% Return cost as the sum of squared differences of model and experiment
% cost = sum(sum((v_fit-r_n).^2));
cost = sum((sum(v_fit, 2) - reference).^2);
end
back to top