18 lines
434 B
Matlab
18 lines
434 B
Matlab
function x = moleFractions(tp)
|
|
% MOLEFRACTIONS - Mole fractions.
|
|
%
|
|
% moleFractions(phase)
|
|
%
|
|
% returns the array of species mole fractions for phase 'phase'. If
|
|
% no output argument is specified, a bar plot is produced.
|
|
%
|
|
|
|
x = phase_get(tp.tp_id, 20);
|
|
if nargout == 0
|
|
figure
|
|
set(gcf, 'Name', 'Mole Fractions')
|
|
bar(x)
|
|
xlabel('Species Number')
|
|
ylabel('Mole Fraction')
|
|
title('Species Mole Fractions')
|
|
end
|