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!