blob: 86fc5f3c8272bb8eb2ebb72b1500595f7951c451 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
function M1=%hm_f_hm(M1,M2)
d1=M1.dims;
d2=M2.dims;
if size(d1,"*")<>size(d2,"*") then
error(msprintf(_("%s: In concatenation the number of dimensions for each component must match.\n"),"%hm_f_hm"));
end
kd=find(d1(2:$)<>d2(2:$))
if kd<>[] then
error(msprintf(_("%s: Inconsistent dimensions.\n"),"%hm_f_hm"));
end
M1.entries=matrix([matrix(M1.entries,double(d1(1)),-1);
matrix(M2.entries,double(d2(1)),-1)],-1,1)
M1.dims(1)=d1(1)+d2(1);
endfunction
|