| [n,x,fvec,fjac,ldfjac,iflag]=sqjac2(n,x,fvec,fjac,ldfjac,iflag); |
function [n,x,fvec,fjac,ldfjac,iflag]=sqjac2(n,x,fvec,fjac,ldfjac,iflag);
x_shape=size(x);x=reshape(x,1,[]);
fvec_shape=size(fvec);fvec=reshape(fvec,1,[]);
fjac_shape=size(fjac);fjac=reshape([fjac(:).',zeros(1,ceil(numel(fjac)./prod([ldfjac])).*prod([ldfjac])-numel(fjac))],ldfjac,[]);
fjac(1,1) = -1.0e0;
fjac(1,2) = 0.0e0;
fjac(2,1) = -2.0e1.*x(1);
fjac(2,2) = 1.0e1;
x_shape=zeros(x_shape);x_shape(:)=x(1:numel(x_shape));x=x_shape;
fvec_shape=zeros(fvec_shape);fvec_shape(:)=fvec(1:numel(fvec_shape));fvec=fvec_shape;
fjac_shape=zeros(fjac_shape);fjac_shape(:)=fjac(1:numel(fjac_shape));fjac=fjac_shape;
end %subroutine sqjac2
|
|