cantera/interfaces/matlab/toolbox/@ThermoPhase/speciesName.m

15 lines
426 B
Matlab

function nm = speciesName(tp, k)
% SPECIESNAME - Name of species k.
% If k is a scalar integer, the return value will be a string
% containing the name of the kth species. If it is an array of
% integers, the output will be a cell array of
% the same shape containing the name strings.
%
[m,n] = size(k);
nm = cell(m, n);
for i = 1:m
for j = 1:n
nm{i,j} = phase_get(tp.tp_id, 40, k(i,j));
end
end