matlabsvmmatlab-guidematlab-deploymentnominal-data

MATLAB - Directly convert nominal data to numeric


Is there any Matlab function to directly convert nominal data to numeric one ?

N.b that currently, and after several searches, I use NumericGroup=str2num(char(NominalGroup))

Thanks,


Solution

  • double(NominalGroup) will convert a nominal/categorical array to a double array.