function p=vapprvt(t,j)
% vapprvt: calculates Antoine vapor pressure for a vector of temperatures
% function p=vapprvt(t,j)
% Argument List:
% Argument   Gives
%    t      vector of temperatures in Tdeg.
%    j      indices of compounds in cnms that will
%            have their vapor pressures determined.
%           If this argument is omitted, all vapor pressures
%             will be found.
% Aabc must be set for the compounds with setnme.
% Ex: start301
%     setnme
%   Specify the compounds you want.
%     Tdeg='C';
%     vapprvt([100 300])
%   will give the vapor pressures of all the compounds at 100 & 300C.
% The vapor pressure is given in kPa for the Antoine Data in sdata.

global Aabc
if nargin==1
	p=[];
   for k=1:length(t)
      p=[p;(exp(Aabc(:,1)-Aabc(:,2)./(at(t(k))+Aabc(:,3))))'];
   end
else
   for k=1:length(t)
      p=[p;(exp(Aabc(j,1)-Aabc(j,2)./(at(t(k))+Aabc(j,3))))'];
   end
end
