Regular Expressions using regexp

I have a cell array of strings a = {'-2.4,-3';'2,3';'0,5';'-4,-2.5';'A';'V';'C'}
Now I want to list those strings which have a "comma".

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 12 de Oct. de 2013
Editada: Azzi Abdelmalek el 12 de Oct. de 2013
a={'-2.4,-3';'2,3';'0,5';'-4,-2.5';'A';'V';'C'}
out=a(cellfun(@(x) ~isempty(strfind(x,',')),a))

Más respuestas (1)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Preguntada:

el 12 de Oct. de 2013

Respondida:

el 13 de Oct. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by