cantera/interfaces/matlab/toolbox/@ThermoPhase/elementName.m
Ray Speth 2528df0f75 Reorganized source tree structure
These changes make it unnecessary to copy header files around during
the build process, which tends to confuse IDEs and debuggers. The
headers which comprise Cantera's external C++ interface are now in
the 'include' directory.

All of the samples and demos are now in the 'samples' subdirectory.
2012-02-12 02:27:14 +00:00

17 lines
429 B
Matlab

function nm = elementName(a, m)
% ELEMENTNAME - Name of element with index m.
%
% If m is a scalar integer, the return value will be a string
% containing the name of the m^th species. If it is an array of
% integers, the output will be a cell array of
% the same shape containing the name strings.
%
[mm, nn] = size(m);
nm = {};
for i = 1:mm
for j = 1:nn
nm{i,j} = phase_get(a.tp_id, 41, m(i,j));
end
end