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

📄 lindosparse.m

📁 optimization toolbox
💻 M
字号:
function [Nbegcol,Nlencol,Nrowndx] = lindosparse(cJacobian);

Nbegcol = [];
Nrowndx = [];
Nlencol = [];
top = 0;
for i = 1:size(cJacobian,2)
    [ii,jj,kk] = find(cJacobian(:,i));
    if isempty(ii)
        Nbegcol = [Nbegcol top];
        Nlencol = [Nlencol 0];
    else
        Nbegcol = [Nbegcol top];
        Nrowndx = [Nrowndx ii(:)'-1];
        Nlencol = [Nlencol length(ii)];
        top = top + length(ii);
    end
end
if  isempty(Nrowndx)
    Nrowndx = [];
end
Nbegcol = [Nbegcol sum(Nlencol)];

⌨️ 快捷键说明

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