License

The function SIP2NUM converts a string with a metric prefix (aka SI prefix, or engineering prefix) into numeric values. For example the string '1 k' is converted to 1000. The bonus function BIP2NUM converts from Binary-prefixed string to numeric, for example the value '1 Ki' is converted to 1024.

After testing the metric-prefix submissions on MATLAB FEX (see Acknowledgements) and not finding a single one that converted all values correctly, I wrote my own functions. And then exhaustively tested them to confirm that they actually give the correct output.

This submission:
* Automatically detects the prefix, or it may be specified as being either the name or symbol.
* Detects coefficients including +/- sign, decimal digits and exponent E-notation.
* Detects zero or more coefficients in the string.
* Returns the parts of the input string that are split by the detected coefficients & prefixes.
* Returns the number of significant figures detected in the coefficients.