1 Matlab Cell Array Basic Operations

Go to the MLX, M, PDF, or HTML version of this file. Go back to fan’s MEconTools Package, Matlab Code Examples Repository (bookdown site), or Math for Econ with Matlab Repository (bookdown site).

1.1 String Combine with string cell

ls_st_param_key = {'fl_crra', 'fl_beta', ...
                   'fl_w', 'fl_r_save', ...
                   'fl_a_max', 'it_z_n', 'it_a_n'};
cl_st_param_keys = {'fl_wad', 'fl_betart', 'it_z_nfg'};
st_param = 'asdjfl';
disp([{st_param}, ls_st_param_key, cl_st_param_keys]);

  Columns 1 through 10

    {'asdjfl'}    {'fl_crra'}    {'fl_beta'}    {'fl_w'}    {'fl_r_save'}    {'fl_a_max'}    {'it_z_n'}    {'it_a_n'}    {'fl_wad'}    {'fl_betart'}

  Column 11