Code covered by the BSD License  

Highlights from
slatec

from slatec by Ben Barrowes
The slatec library converted into matlab functions.

[prvecresult,m,u,v]=prvec(m,u,v);
function [prvecresult,m,u,v]=prvec(m,u,v);
prvecresult=[];
persistent n np prvec vp ; 

if isempty(n), n=0; end;
if isempty(np), np=0; end;
if isempty(prvecresult), prvecresult=0; end;
if isempty(vp), vp=0; end;
%***BEGIN PROLOGUE  PRVEC
%***SUBSIDIARY
%***PURPOSE  Subsidiary to BVSUP
%***LIBRARY   SLATEC
%***TYPE      SINGLE PRECISION (PRVEC-S, DPRVEC-D)
%***AUTHOR  Watts, H. A., (SNLA)
%***DESCRIPTION
%
%  This subroutine computes the inner product of a vector U
%  with the imaginary product or mate vector corresponding to V
%
%***SEE ALSO  BVSUP
%***ROUTINES CALLED  SDOT
%***REVISION HISTORY  (YYMMDD)
%   750601  DATE WRITTEN
%   891214  Prologue converted to Version 4.0 format.  (BAB)
%   900328  Added TYPE section.  (WRB)
%   910722  Updated AUTHOR section.  (ALS)
%***end PROLOGUE  PRVEC
%
u_shape=size(u);u=reshape(u,1,[]);
v_shape=size(v);v=reshape(v,1,[]);
%***FIRST EXECUTABLE STATEMENT  PRVEC
n = fix(fix(m./2));
np = fix(n + 1);
[vp ,n,u(sub2ind(size(u),max(1,1)):end),dumvar4,v(sub2ind(size(v),max(np,1)):end)]=sdot(n,u(sub2ind(size(u),max(1,1)):end),1,v(sub2ind(size(v),max(np,1)):end),1);
prvecresult = sdot(n,u(sub2ind(size(u),max(np,1)):end),1,v(sub2ind(size(v),max(1,1)):end),1) - vp;
u_shape=zeros(u_shape);u_shape(:)=u(1:numel(u_shape));u=u_shape;
v_shape=zeros(v_shape);v_shape(:)=v(1:numel(v_shape));v=v_shape;
csnil=dbstack(1); csnil=csnil(1).name(1)~='@';
if csnil&&~isempty(inputname(3)), assignin('caller','FUntemp',v); evalin('caller',[inputname(3),'=FUntemp;']); end
if csnil&&~isempty(inputname(2)), assignin('caller','FUntemp',u); evalin('caller',[inputname(2),'=FUntemp;']); end
if csnil&&~isempty(inputname(1)), assignin('caller','FUntemp',m); evalin('caller',[inputname(1),'=FUntemp;']); end
end
%DECK PRWPGE

Contact us at files@mathworks.com