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
computeQbar.m 415 Bytes
Copy Edit Web IDE Raw Blame History
Colin Calas authored 2017-08-25 14:23 . first commit
function Qbar = computeQbar(C, Q, S, ny)
Qbar_tmp = cell(ny, ny);
for i=1:ny
for j=1:ny
if i==j
if i == ny
Qbar_tmp{ny,ny} = C'*S*C;
else
Qbar_tmp{i,j} = C'*Q*C;
end
else
Qbar_tmp{i,j} = zeros(size(C'*Q*C));
end
end
end
Qbar = cell2mat(Qbar_tmp);
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