diff options
author | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
---|---|---|
committer | Matth?us G. Chajdas <dev@anteru.net> | 2019-11-10 13:56:53 +0100 |
commit | 1dd3124a9770e11b6684e5dd1e6bc15a0aa3bc67 (patch) | |
tree | 87a171383266dd1f64196589af081bc2f8e497c3 /tests/examplefiles/scilab.sci | |
parent | f1c080e184dc1bbc36eaa7cd729ff3a499de568a (diff) | |
download | pygments-master.tar.gz |
Diffstat (limited to 'tests/examplefiles/scilab.sci')
-rw-r--r-- | tests/examplefiles/scilab.sci | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/examplefiles/scilab.sci b/tests/examplefiles/scilab.sci deleted file mode 100644 index 8dea7b9c..00000000 --- a/tests/examplefiles/scilab.sci +++ /dev/null @@ -1,30 +0,0 @@ -// Scilab ( http://www.scilab.org/ ) -// Copyright (C) INRIA - Serge STEER -// - -function I=sub2ind(dims,varargin) -//sub2ind is used to determine the equivalent single index -//corresponding to a given set of subscript values. - -//I = sub2ind(dims,i1,i2,..) returns the linear index equivalent to the -//row, column, ... subscripts in the arrays i1,i2,.. for an matrix of -//size dims. - -//I = sub2ind(dims,Mi) returns the linear index -//equivalent to the n subscripts in the columns of the matrix Mi for a matrix -//of size dims. - - d=[1;cumprod(matrix(dims(1:$-1),-1,1))] - for i=1:size(varargin) - if varargin(i)==[] then I=[],return,end - end - - if size(varargin)==1 then //subindices are the columns of the argument - I=(varargin(1)-1)*d+1 - else //subindices are given as separated arguments - I=1 - for i=1:size(varargin) - I=I+(varargin(i)-1)*d(i) - end - end -endfunction |