OpenPBS.VehicleModels.Functions

Package Content

Name Description
OpenPBS.VehicleModels.Functions.tril tril Create n x n triangular lower matrix

OpenPBS.VehicleModels.Functions.tril

Create n x n triangular lower matrix

Inputs

TypeNameDefaultDescription
Integern  

Outputs

TypeNameDescription
Integerm[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.