⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkpsd.m

📁 These Matlab files are a convenient interface for the Java library containing the implementation of
💻 M
字号:
function s = checkpsd(s)

if (any(isnan(s) | isinf(s) | ~isreal(s)))
  warning('S contains complex numbers, Inf, or NaN'); 
end
% Drop any negative eigenvalues.
[V, D] = eig(full(s));
d = real(diag(D));
if (any(d < 0))
  warning(sprintf(['S is not positive semidefinite (min. eig. =' ...
		   ' %0.5g); projecting.'], min(d)));
  d(find(d < 0)) = 0;
  D = diag(d);
  s = V * D * V';
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -