%% Logical Input with Double Output
% Create an array of logical values.

A = [true false true; true true false]

%
% Find the cumulative product of the rows of A.

B = cumprod(A,2)

%
% The output has type double.

class(B)

% Copyright 2012 The MathWorks, Inc.