MATLAB: Determining decimal point validation

decimal value specification and analysis

I have a editbox in a GUI created in Guide.
The type of input will be D.MMSS.
I want to be able to determine if the value inputted is valid.
I.e. The D value to be 0 <= D <= 360, the MM to be 0 <= MM <= 60 and the SS to be 0 <= MM <= 60 .
How do I specify the decimal placements to be analysed?
I.e. the first two decimal places to be analysed using the specified limits and then the 3rd and 4th decimal places to be analysed?
I realise that it would be easier to have 3 drop boxes with the values restricted (one for degrees, one for minutes and one for seconds), but I simply don't have enough room on my GUI with the proceeding input boxes.

Best Answer

strsplit() with '.' to get the D. The first two characters in the second fragment are the MM. Whatever is left in the second fragment is the S
Related Question