how use categorical in uitable
VNAMES={‘On’,’Trading’,’L_S’,’Stat’,’PROVA’,’Cap’,’Perc’,’Draw_Sys’};
cat=categorical({‘Fil’;’Stat’});
VTYPES=[{‘logical’},{‘string’},{‘string’},{‘double’},{‘double’},{‘cat’},{‘double’},{‘logical’}];
T=table(‘Size’,[nrows,numel(VNAMES)],’VariableTypes’,VTYPES,’VariableNames’,VNAMES);
Error using table (line 310)
Specify variable types as a string array or a cell array of character
vectors, such as ["string", "datetime", "double"].
i try to use in vtypes : {‘cat’}..{cat}…{"cat"} but it give me an errorVNAMES={‘On’,’Trading’,’L_S’,’Stat’,’PROVA’,’Cap’,’Perc’,’Draw_Sys’};
cat=categorical({‘Fil’;’Stat’});
VTYPES=[{‘logical’},{‘string’},{‘string’},{‘double’},{‘double’},{‘cat’},{‘double’},{‘logical’}];
T=table(‘Size’,[nrows,numel(VNAMES)],’VariableTypes’,VTYPES,’VariableNames’,VNAMES);
Error using table (line 310)
Specify variable types as a string array or a cell array of character
vectors, such as ["string", "datetime", "double"].
i try to use in vtypes : {‘cat’}..{cat}…{"cat"} but it give me an error VNAMES={‘On’,’Trading’,’L_S’,’Stat’,’PROVA’,’Cap’,’Perc’,’Draw_Sys’};
cat=categorical({‘Fil’;’Stat’});
VTYPES=[{‘logical’},{‘string’},{‘string’},{‘double’},{‘double’},{‘cat’},{‘double’},{‘logical’}];
T=table(‘Size’,[nrows,numel(VNAMES)],’VariableTypes’,VTYPES,’VariableNames’,VNAMES);
Error using table (line 310)
Specify variable types as a string array or a cell array of character
vectors, such as ["string", "datetime", "double"].
i try to use in vtypes : {‘cat’}..{cat}…{"cat"} but it give me an error how use categorical in uitable MATLAB Answers — New Questions