Files
ODrive/analysis/numeric_path_opt/predictionmatrices.m
2017-10-15 02:03:35 -07:00

15 lines
338 B
Matlab

function [Phi, Gamma, Lambda] = predictionmatrices(A, B, C, N)
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
n = size(A,1);
Atilde = [A; zeros((N-1)*n, n)];
k = [zeros(n, N*n); -kron(eye(N-1), A) zeros((N-1)*n,n)] + eye(N*n);
Phi = k\Atilde;
Gamma = k\kron(eye(N), B);
Lambda = kron(eye(N), C);
end