I have to cell arrays A & B
A = ['C1 H2 O1 N1 S1'; [];'C5 H2 O0 N1 S0';'C2 H6 O0 N1 S1';'C2 H6 O2 N1 S0';[];'C3 H10 O1 N1 S0';'C6 H5 O2 N2 S1';'C8 H9 O4 N0 S0';[];'C9 H13 O3 N0 S0';'C10 H17 O2 N0 S0';'C11 H21 O1 N0 S0';'C12 H25 O0 N0 S0'];
and
B = ['C5H9O2+''C3H5O4''C3H7O5']
and I would like to have B in the same pattern as A so that (C* H* O* N* S*)
and deleting the +
B[1] = 'C5 H9 O2 NO S0'
kinda tried with regexprep() but didn't get anything by now…..
Best Answer