matlab - 如何在 MATLAB 中将 symfun 转换为字符串
问题描述
我只是这样做了
这导致像这样的变量
我想将此 ySol 转换为类似“C1*exp(t^2/2)”的字符串
当我正在制作一个 GUI 应用程序时,我想在 TextBox 中显示这个求解的方程值
我试过了
num2str(ySol)
compose(ySol)
cprintf(ySol)
sprintf(ySol)
解决方案
您可以使用:
char(ySol) % to get the following char array 'C1*exp(t^2/2)'
string(ySol) % to get the following string array "C1*exp(t^2/2)"
请注意,这是一个未记录的 matlab 功能,可以随时删除。
推荐阅读
- html - 使每个部分出现在中间行的左/右
- r - 散点图上不显示颜色
- ruby - rbenv错误的gem安装路径-找不到gem
- javascript - 如何确保 mocha 测试中的“this”可以访问类属性
- c++ - c++ std::weak_ptr 堆栈对象
- java - 制作一个字符列表的列表
- openimageio - 使用oiiotool组合两个图像的图像通道
- curl - Curl 命令在具有流程库的机器人框架上无法正常工作
- .htaccess - 将域重定向到另一个域并将重定向的域附加为查询字符串
- javascript - 如何使用ajax Jquery检查文本框值用户在文本框中输入的值是对还是错?