1 % Plots the sparsity patterns of the Jacobian and the Hessian
8 J( LU_IROW(k), LU_ICOL(k) ) = 1;
11 TK = floor( linspace(1,NVAR,5) );
12 set(gca,'XTick',TK,'YTick',TK,'FontSize',14,'LineWidth',2);
17 H = zeros(NVAR,NVAR,NVAR);
19 H( IHESS_I(k), IHESS_J(k), IHESS_K(k) ) = 1;
20 H( IHESS_I(k), IHESS_K(k), IHESS_J(k) ) = 1;
23 M = ceil( sqrt(NVAR) );
31 G = reshape( H(k,1:NVAR,1:NVAR), NVAR, NVAR );
32 % spy(G); figure;hold on
33 for iH=1:NVAR; for jH=1:NVAR
35 plot(iH,NVAR+1-jH,'.');
38 text(NVAR/6,NVAR*0.6,int2str(k))
39 set(gca,'XLim',[1,NVAR],'YLim',[1,NVAR]);
40 set(gca,'XTick',[],'YTick',[]);