I assume that Mode is supposed to be the name of the columns, in which case the proper syntax should be:
T = table(Radius, length, Pi, 'VariableNames', Mode)
Unfortunately, it's still not going to work for two reasons:
- You missed a space in your Mode declaration and as a result it only has two elements, the 2nd one being the string scaled vehicle 1:8'scaled vehicle 1:25. To fix this:
Mode = {'Actual Vehicle' 'scaled vehicle 1:8' 'scaled vehicle 1:25'};
- column names must be valid matlab variable names, which means no space or :. If you're happy with matlab replacing invalid characters, then:
T = table(Radius, length, Pi, 'VariableNames', matlab.lang.makeValidName(Mode))
You could set the table VariableDescriptions properties to the untouched Mode if you want:
T.properties.VariableDescriptions = Mode;
but it's not that useful, as matlab only displays that description with summary: