x = EmpiricalFormula()
x = EmpiricalFormula('H2O')
x = EmpiricalFormula(struct('H', 2, 'O', 1))
Jonathan Karr (2020). Empirical formula (https://www.mathworks.com/matlabcentral/fileexchange/39569-empirical-formula), MATLAB Central File Exchange. Retrieved .
Jonathan, I think this could be a useful piece of code, but you have not documented it. If you have gone to the effort of writing and shareing the code, I suggest going the extra effort to document it so others might be interested in using it.