⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cumsumc.src

📁 没有说明
💻 SRC
字号:
/*
** cumsumc.src
** (C) Copyright 1988-1998 by Aptech Systems, Inc.
** All Rights Reserved.
**
** This Software Product is PROPRIETARY SOURCE CODE OF APTECH
** SYSTEMS, INC.    This File Header must accompany all files using
** any portion, in whole or in part, of this Source Code.   In
** addition, the right to create such files is strictly limited by
** Section 2.A. of the GAUSS Applications License Agreement
** accompanying this Software Product.
**
** If you wish to distribute any portion of the proprietary Source
** Code, in whole or in part, you must first obtain written
** permission from Aptech Systems.
**
**> cumsumc
**
**  Purpose:   Computes the cumulative sums of the columns of a matrix.
**
**  Format:    y = cumsumc( x );
**
**  Input:     x    NxK matrix.
**
**  Output:    y    NxK matrix containing the cumulative sums of the columns
**                  of x.
**
**  Remarks:   This is based on the recursive series function recserar. That
**             function could be called directly as:
**                 recserar( X, X[1,.], ones(1,cols(X)) );
**             to accomplish the same thing.
**
**  Example:   let x[3,2] = 1  -3
**                          2   2
**                          3  -1;
**
**             y = cumsumc( x );
**
**             The result is:
**
** See Also:  cumprodc, recsercp, recserar
*/

proc cumsumc(x);
    if rows(x) == 1;
        retp(x);
    else;
        retp( recserar(x,x[1,.],ones(1,cols(x)) ) );
    endif;
endp;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -