sym2str

Converts symbolic variables to matlab strings using array opperations.

您现在正在关注此提交

Converts symbolic variables to a Matlab equation string insuring that only array opps are used. Symbolic arrays are converted to linear Cell arrays of strings. This function is most often used to prepare symbolic answers for use with the "eval()" command. Also, converts Maple "atan" function to Matlab "atan2". Converts
Maple "array([[a,b],[c,d]])" notation to matlab "[a,b;c,d]" notation.

Note: eval() of a matrix only works if all the input variables have single values. i.e. vectors and arrays won't work.

Note2: eval() does not work on Cell arrays directly. Use "Cell_array{index}" to keep eval() happy

引用格式

Martin Lawson (2026). sym2str (https://ww2.mathworks.cn/matlabcentral/fileexchange/19217-sym2str), MATLAB Central File Exchange. 检索时间: .

致谢

启发作品: campodir

类别

Help CenterMATLAB Answers 中查找有关 Symbolic Math Toolbox 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.1.0.0

Added a code example to the help.

1.0.0.0

A bone headed copy-paste error causes improper results when processing symbolic arrays. ('i' and '1' are hard to tell apart :P )