MATLAB: I have a question related to cell arrays. How to delete a specific row by checking the first element of that row

cell arraysdata importfor loopmatrices

Here I have a matrix, and I want to eliminate the rows which start with '$', please go through the excel file that I have attached.
What I'm expecting is this as ouput, which I may write it to another excel file:
'c' '1' '2.400000000000000E+00' '2.400000000000000E+00' '2.400000000000000E+00' 'c' '2' '3.360000000000000E+00' '2.400000000000000E+00' '2.400000000000000E+00' 'c' '3' '4.320000000000000E+00' '2.400000000000000E+00' '2.400000000000000E+00' 'c' '4' '5.280000000000001E+00' '2.400000000000000E+00' '2.400000000000000E+00' 'c' '5' '6.240000000000000E+00' '2.400000000000000E+00' '2.400000000000000E+00'

Best Answer

To remove elements from a matrix and cell arrays you assign [] to them.
To find strings that match you use strcmp. You only want to do the comparison with the first column, so you use the () indexing for that.
Therefore:
c = {'$', '$', 'wmesh', '[geo_Meshio.c]', '--';
'$', 'c', '216', '', '';
'$', 'r', '6', '', '';
'$', 'x', '119', '' '';
'$', '$ Vertices', '', '', '';
'c', '1', '2.400000000000000E+00', '2.400000000000000E+00', '2.400000000000000E+00';
'c', '2', '3.360000000000000E+00', '2.400000000000000E+00', '2.400000000000000E+00';
'c', '3', '4.320000000000000E+00', '2.400000000000000E+00', '2.400000000000000E+00';
'c', '4', '5.280000000000001E+00', '2.400000000000000E+00', '2.400000000000000E+00';
'c', '5', '6.240000000000000E+00', '2.400000000000000E+00', '2.400000000000000E+00'};
c(strcmp(c(:, 1), '$'), :) = []