function [p, K, R2_vector, v_vector, p_other, Model]=model_matrices(Model, Rtotal, LRratio)
%------------------- LineshapeKin Simulation -----------------------------
% Wrapper function for different model-specific solvers
%
% 5/12/09
% Written by Evgenii Kovrigin 
% Medical College of Wisconsin
%

switch Model.code
    
    case 'U'
         [p, K, R2_vector, v_vector, p_other, Model]=U_model_matrices(Model, Rtotal, LRratio);
         
    case 'U_L'
         [p, K, R2_vector, v_vector, p_other, Model]=U_L_model_matrices(Model, Rtotal, LRratio);

    case 'U_L2'
         [p, K, R2_vector, v_vector, p_other, Model]=U_L2_model_matrices(Model, Rtotal, LRratio);
         
    case 'U_R'
         [p, K, R2_vector, v_vector, p_other, Model]=U_R_model_matrices(Model, Rtotal, LRratio);
         
    case 'U_RL'
         [p, K, R2_vector, v_vector, p_other, Model]=U_RL_model_matrices(Model, Rtotal, LRratio);
         
    case 'U_R2'
         [p, K, R2_vector, v_vector, p_other, Model]=U_R2_model_matrices(Model, Rtotal, LRratio);
         
    case 'U_R2L2'
         [p, K, R2_vector, v_vector, p_other, Model]=U_R2L2_model_matrices(Model, Rtotal, LRratio);

    case 'U_R_RL'
         [p, K, R2_vector, v_vector, p_other, Model]=U_R_RL_model_matrices(Model, Rtotal, LRratio);         
         
    case 'U_R_L'
         [p, K, R2_vector, v_vector, p_other, Model]=U_R_L_model_matrices(Model, Rtotal, LRratio);         
         
    case 'U_R_RL_RM'
         [p, K, R2_vector, v_vector, p_other, Model]=U_R_RL_RM_model_matrices(Model, Rtotal, LRratio);         
         
    case 'U_R_RL_RM_RLM'
         [p, K, R2_vector, v_vector, p_other, Model]=U_R_RL_RM_RLM_model_matrices(Model, Rtotal, LRratio);         
         
    case 'B'
         [p, K, R2_vector, v_vector, p_other, Model]=B_model_matrices(Model, Rtotal, LRratio);

    case 'B_R2_R2L2'
        error('The model %s is temporarily disabled - needs correction to K matrix calculation (contact the developer, please).', Model.code)
         % [p, K, R2_vector, v_vector, p_other, Model]=B_R2_R2L2_model_matrices(Model, Rtotal, LRratio);

    otherwise
         error('Unknown model code %s !!!', Model.code)
end


