Skip to content
Snippets Groups Projects
Select Git revision
  • 6.x protected
  • master default protected
  • madysson
  • 5.x protected
  • asm
  • time-varying-information-set
  • 4.6 protected
  • dynare_minreal
  • dragonfly
  • various_fixes
  • 4.5 protected
  • clang+openmp
  • exo_steady_state
  • declare_vars_in_model_block
  • julia
  • error_msg_undeclared_model_vars
  • static_aux_vars
  • slice
  • aux_func
  • penalty
  • 6.3 protected
  • 6.2 protected
  • 6.1 protected
  • 6.0 protected
  • 6-beta2 protected
  • 6-beta1 protected
  • 5.5 protected
  • 5.4 protected
  • 5.3 protected
  • 5.2 protected
  • 5.1 protected
  • 5.0 protected
  • 5.0-rc1 protected
  • 4.7-beta3 protected
  • 4.7-beta2 protected
  • 4.7-beta1 protected
  • 4.6.4 protected
  • 4.6.3 protected
  • 4.6.2 protected
  • 4.6.1 protected
40 results

common_strings_in_cell_arrays.m

  • Stéphane Adjemian's avatar
    4d09ee6a
    Added new routine. · 4d09ee6a
    Stéphane Adjemian authored
    Compare two one dimensional cells of strings and count the number of common strings. The
    optional second argument returns a formated list of common variables.
    
    *Example*
    
    If we have:
    
    A = {'A1'; 'A2'; 'A3'; 'A4'; 'A5'; 'A6'};
    B = {'B1'; 'A2'; 'B3'; 'A4'; 'A1'};
    
    then
    
    [n,message] = common_strings_in_cell_arrays(A,B);
    
    returns n=3 and message='A2, A4 and A1'.
    4d09ee6a
    History
    Added new routine.
    Stéphane Adjemian authored
    Compare two one dimensional cells of strings and count the number of common strings. The
    optional second argument returns a formated list of common variables.
    
    *Example*
    
    If we have:
    
    A = {'A1'; 'A2'; 'A3'; 'A4'; 'A5'; 'A6'};
    B = {'B1'; 'A2'; 'B3'; 'A4'; 'A1'};
    
    then
    
    [n,message] = common_strings_in_cell_arrays(A,B);
    
    returns n=3 and message='A2, A4 and A1'.