MATLAB: Extracting non-alphabets from a string

string parsing

I have a string of the form Str='G02X56.32Y13.05Z4.5F0.1'
I want to extract x=56.32, Y=13.05 etc. The orders of X and Y can be interchanged. How do I extract non-alphabetical characters in between two alphabets?
I use N = cellfun(@str2double,regexp(Str,'(?<=X)-*\d+','match')) and I get only 56 instead of 56.32. Please help me! Thanks!

Best Answer

Str='G02X56.32Y13.05Z4.5F0.1'
str2double(regexp(Str,'\d+(\.\d+)?','match'))