OpenPBS.VehicleModels
.Functions
Package Content
Name
Description
tril
Create n x n triangular lower matrix
OpenPBS.VehicleModels.Functions
.tril
Create n x n triangular lower matrix
Inputs
Type
Name
Default
Description
Integer
n
Outputs
Type
Name
Description
Integer
m[n, n]
Modelica definition
function
tril
"Create n x n triangular lower matrix"
input
Integer n;
output
Integer m[n,n];
algorithm
for
i
in
1:n
loop
for
j
in
1:n
loop
if
i>=j
then
m[i,j]:=1;
else
m[i,j]:=0;
end if
;
end for
;
end for
;
end
tril;
Automatically generated
Tue Feb 23 11:57:20 2021.