/usr/share/freemat/toolbox/array/length.m is in freemat-data 4.0-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | % LENGTH LENGTH Length of an Array
%
% Usage
%
% Returns the length of an array x. The syntax for its use
% is
%
% y = length(x)
%
% and is defined as the maximum length of x along any of its
% dimensions, i.e., max(size(x)). If you want to determine the
% number of elements in x, use the numel function instead.
% Copyright (c) 2002-2006 Samit Basu
% Licensed under the GPL
function len = length(x)
if (isempty(x))
len = 0;
else
len = max(size(x));
end
|