MATLAB: Remove ObsNames from MatLab dataset

dataset obsnamesStatistics and Machine Learning Toolbox

Hi,
As a result from a grpstats on a MatLab dataset, I end up with a MatLab dataset having ObsNames filled in. I do not like that, because these ObsNames are exported to Excel. Is there a way to remove ObsNames from a MatLab dataset or set these to empty ?
Thanks, Gerben

Best Answer

The property ObsNames may be empty. Otherwise, it should have as many strings as observations. To remove these ObsNames from a dataset called d1, you can do the following:
d1.Properties.ObsNames = {};
Related Question