scalar value
array data type
var dt = minDataType( 3.141592653589793 );
// returns 'float32'
var dt = minDataType( 3 );
// returns 'uint8'
Returns the minimum array data type of the closest "kind" necessary for storing a provided scalar value.
scalar value
array data type
var z = {
're': 3.141592653589793,
'im': 1.0
};
var dt = minDataType( z );
// returns 'complex64'
Returns the minimum array data type of the closest "kind" necessary for storing a provided scalar value.
scalar value
array data type
var dt = minDataType( 'beep' );
// returns 'generic'
Returns the minimum array data type of the closest "kind" necessary for storing a provided scalar value.
Notes