| New Class Inputs for sum The following new input arguments for sum control how the summation is performed on numeric inputs: • s = sum(x,'native') and s = sum(x, dim,'native') accumulate in the native type of its input and the output s has the same data type as x.This is the default for single and double. • s = sum(x,'double') and s = sum(x, dim, 'double') accumulate in double-precision. This is the default for integer data types. In Version 7.0, sum applied to a vector of type single performs single accumulation and returns a result of type single.In other words, sum(x) is thesameas sum(x, 'native') if x has type single. This is a change in the behavior of sum from previous releases. To make sum accumulate in double, as in previous releases, use the input argument 'double '. |