MATLAB: How to create symbolic vector

symsym functionsymbolic vector

hi. im using MATLAB version 7.9.0 (R2009b) and i would like to create symbolic vector. it should go like that: a=sym('a', [1 10]), where second argument means the length of the vector. but it doesnt want to work; error occurs: Formatted arguments cannot be non-scalar numeric matrices. how should i do it/any other way? thank you.

Best Answer

v=['[' sprintf('a%d,',1:10)];
v(end)=']'
a=sym(v)