producing syms
Mostrar comentarios más antiguos
hi I`m saeed I want to write a script that ask me the n (number) and then produce sym n characters respectively like x1 x2 x3 x3 ... thanks
Respuestas (1)
Oleg Komarov
el 1 de Ag. de 2011
% Create names X1,...,Xn
vars = arrayfun(@(v) sprintf('x%d',v),1:n,'un',0);
% Create syms
syms(vars{:})
Categorías
Más información sobre Conversion Between Symbolic and Numeric en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!