MATLAB: How to recognize if there is in a character a point ‘.’

charisstrprop

Dear Matlab community,
Maybe somebody can help me with the following problem. For a project I would if there is a character a point '.' by scanning each element of the character by returning a true (1), false (0) as answer in an array. I tried the following:
xx='00-055.0'
isstrprop(xx,'punct')
ans =
1×8 logical array
0 0 1 0 0 0 1 0
At the moment it also shows e.g. '-', but is there a method to find explicitely the point '.'?
Thank you.
Regards

Best Answer

contains(regexp(xx,'.','match'),'.')
%or

strcmp(regexp(xx,'.','match'),'.')
%or
cellfun(@(x)x=='.',regexp(xx,'.','match'))
Gives:
ans =
1×8 logical array
0 0 0 0 0 0 1 0