MATLAB: Convert variables from string to integers


hi ,So im new to matlab and im trying to convert string to integers .The question is 'Convert all the numbers in the variables Oxygen, CarbonDioxide, Temperature, Pressure, SolarRadiation and Humidity from strings to integers.'
is using str2num correct?
%and so on for the other varaibles
is this syntax correct as it produces an output(below) ?or should it contain values from the input data?
Oxygen =

Best Answer

The assignment probably wants you to turn them into unsigned integers.
I leave the rest to you.