producing syms
显示 更早的评论
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
回答(1 个)
Oleg Komarov
2011-8-1
% Create names X1,...,Xn
vars = arrayfun(@(v) sprintf('x%d',v),1:n,'un',0);
% Create syms
syms(vars{:})
类别
在 帮助中心 和 File Exchange 中查找有关 Conversion Between Symbolic and Numeric 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!