MATLAB: Problem in syntax

symSymbolic Math Toolbox

Please help!!!
a lok = sym('alok%d%d', [3 5 1]) % the piece of code and the error is below
??? Error using ==> sym.sym>createCharMatrix at 2480
Matrix syntax can only create vectors and matrices.
Error in ==> sym.sym>convertCharWithOption at 2439
s = createCharMatrix(x,a);
Error in ==> sym.sym>tomupad at 2195
S = convertCharWithOption(x,a);
Error in ==> sym.sym>sym.sym at 123
S.s = tomupad(x,a);

Best Answer

You cannot use that syntax to create a 3D symbolic matrix.
I note that you only have two %d in your symbol format, so I am not sure what you want to have happen for the third index?