I have a cell with strings in the following format:
data = {'para1_left = numeric value';'para1_right = numeric value';
'para2_left = numeric value';'para2_right = numeric value';
........
'para100_up = numeric value';'para100_down = numeric value';
and so on...I have a few hundreds of these};
I want two cells out of this cell: one with just the parameter names, p_name, and another with just the values, p_val.
Once I have the two cells, I want to compare the p_name cell with another cell of shorter length. This new cell will have strings in the following format:
new_cell = {'para1';'para5';'para10';...'para25'};
Basically these strings miss the trailing parts: _left, _right, etc.
Then, I want to have a list of indices of p_name that contain any of the strings in new_cell, indx_match = [1;2;10;20....and so on] so that I can get the values of the matching parameter names by doing p_val{indx_match}.
I want to do the above with the minimum number of lines, probably using cellfun. I figured out how to find the indices by using strfind command, but then it creates a cell array and p_val{indx_match} doesn't work (I tried various ways using cellfun, but no success yet).