summaryrefslogtreecommitdiffstats
path: root/templates/generate_disturbances.m
blob: f08cdb5efa521c9b6f68fff4519bdff86f1abcce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (c) 2023, Amon Lahr, Simon Muntwiler, Antoine Leeman & Fabian Flürenbrock Institute for Dynamic Systems and Control, ETH Zurich.
%
% All rights reserved.
%
% Please see the LICENSE file that has been included as part of this package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function Wt = generate_disturbances(params)
    % YOUR CODE HERE
    % params_z = generate_params_z(params);
    Hw = params.constraints.DisturbanceMatrix;
    hw = params.constraints.DisturbanceRHS;
    % Pw = Polyhedron('A', Hw, 'b', hw);
    N = params.model.HorizonLength;
    Wt = cprnd(N,Hw,hw)';
end