def dtype_to_matlab_class(dtype):
    """
    convert dtype to matlab class string
    """
    if dtype.str in ['<f8']:
        return 'double'
    elif dtype.str in ['<f4']:
        return 'single'
    elif dtype.str in ['<i8']:
        return 'int64'
    elif dtype.str in ['<u8']:
        return 'uint64'
    elif dtype.str in ['<i4']:
        return 'int32'
    elif dtype.str in ['<u4']:
        return 'uint32'
    elif dtype.str in ['<i2']:
        return 'int16'
    elif dtype.str in ['<u2']:
        return 'uint16'
    elif dtype.str in ['|i1']:
        return 'int8'
    elif dtype.str in ['|u1']:
        return 'uint8'
convert dtype to matlab class string