www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/LogicalInputwithDoubleOutputExample.m

    %% 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)