Exporting Structures Containing syms
显示 更早的评论
How do I export the following fields with its corresponding values to a text or Excel file? I don't want to export each field manually since I am going to deal with larger structures later.

Note: all the values are numbers, but some of them are negative.
Thanks for helping!
采纳的回答
更多回答(1 个)
Erik Huuki
2021-9-9
编辑:Erik Huuki
2021-9-9
Once you have a workspace you can save it as a mat file for later. Simply right click in the workspace and there should be an option for saving the workspace. Or you could put them all in a cell array as shown below and write to an xlsx file.
syms a b c
example = [string(a),string(b),string(c)];
writematrix(example,'example.xlsx')
类别
在 帮助中心 和 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!