1 Star 1 Fork 0

JeffreyChan / mpc

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
computeCy.m 468 Bytes
Copy Edit Web IDE Raw Blame History
Colin Calas authored 2017-08-25 14:23 . first commit
function Cy = computeCy(ny,n_state)
Cy_tmp1 = cell(ny,ny);
Cy_tmp2 = cell(ny,ny );
%Avant 5 a la place de 7
for i=1:ny
for j=1:ny
if i==j
Cy_tmp1{i,j} = eye(n_state);
Cy_tmp2{i,j} = -eye(n_state);
else
Cy_tmp1{i,j} = zeros(n_state,n_state);
Cy_tmp2{i,j} = zeros(n_state,n_state);
end
end
end
Cy = [cell2mat(Cy_tmp1);cell2mat(Cy_tmp2)];
end

Comment ( 0 )

Sign in for post a comment

Matlab
1
https://gitee.com/jeffreychan/mpc.git
git@gitee.com:jeffreychan/mpc.git
jeffreychan
mpc
mpc
master

Search