| [ppgsfresult,x,iz,c,a,bh]=ppgsf(x,iz,c,a,bh); |
function [ppgsfresult,x,iz,c,a,bh]=ppgsf(x,iz,c,a,bh);
ppgsfresult=[];
persistent j ppgsf summlv ;
if isempty(ppgsfresult), ppgsfresult=0; end;
if isempty(summlv), summlv=0; end;
if isempty(j), j=0; end;
%***BEGIN PROLOGUE PPGSF
%***SUBSIDIARY
%***PURPOSE Subsidiary to CBLKTR
%***LIBRARY SLATEC
%***TYPE SINGLE PRECISION (PPGSF-S)
%***AUTHOR (UNKNOWN)
%***SEE ALSO CBLKTR
%***ROUTINES CALLED (NONE)
%***REVISION HISTORY (YYMMDD)
% 801001 DATE WRITTEN
% 891214 Prologue converted to Version 4.0 format. (BAB)
% 900402 Added TYPE section. (WRB)
%***end PROLOGUE PPGSF
a_shape=size(a);a=reshape(a,1,[]);
c_shape=size(c);c=reshape(c,1,[]);
bh_shape=size(bh);bh=reshape(bh,1,[]);
%***FIRST EXECUTABLE STATEMENT PPGSF
summlv = 0.;
for j = 1 : iz;
summlv = summlv - 1../(x-bh(j)).^2;
end; j = fix(iz+1);
ppgsfresult = summlv;
a_shape=zeros(a_shape);a_shape(:)=a(1:numel(a_shape));a=a_shape;
c_shape=zeros(c_shape);c_shape(:)=c(1:numel(c_shape));c=c_shape;
bh_shape=zeros(bh_shape);bh_shape(:)=bh(1:numel(bh_shape));bh=bh_shape;
csnil=dbstack(1); csnil=csnil(1).name(1)~='@';
if csnil&&~isempty(inputname(1)), assignin('caller','FUntemp',x); evalin('caller',[inputname(1),'=FUntemp;']); end
if csnil&&~isempty(inputname(2)), assignin('caller','FUntemp',iz); evalin('caller',[inputname(2),'=FUntemp;']); end
if csnil&&~isempty(inputname(3)), assignin('caller','FUntemp',c); evalin('caller',[inputname(3),'=FUntemp;']); end
if csnil&&~isempty(inputname(5)), assignin('caller','FUntemp',bh); evalin('caller',[inputname(5),'=FUntemp;']); end
if csnil&&~isempty(inputname(4)), assignin('caller','FUntemp',a); evalin('caller',[inputname(4),'=FUntemp;']); end
end
%DECK PPPSF
|
|