How do I write a .mat file (exported from the Design Data in an .sldd file) to a csv file?
I am trying to write the contents of a .mat file to a csv file. The .mat file was generated by exporting the Design Data from a simulink data dictionary file that is used in a Simulink model. I’ve tried to research how to extract the data from the .mat but haven’t been able to find anything significant. If you have any suggestions for strategies or functions I could use, please add a comment. Thanks.
CODE:
FileData = load(‘SLDD_220817.mat’);
NewData=struct2cell(FileData);
csvwrite(‘SLDD_220817.csv’, NewData);
CW OUTPUT:
Error using csvwrite (line 47)
The input cell array cannot be converted to a matrix.
Error in sldd_to_csv (line 11)
csvwrite(‘SLDD_220817.csv’, NewData);I am trying to write the contents of a .mat file to a csv file. The .mat file was generated by exporting the Design Data from a simulink data dictionary file that is used in a Simulink model. I’ve tried to research how to extract the data from the .mat but haven’t been able to find anything significant. If you have any suggestions for strategies or functions I could use, please add a comment. Thanks.
CODE:
FileData = load(‘SLDD_220817.mat’);
NewData=struct2cell(FileData);
csvwrite(‘SLDD_220817.csv’, NewData);
CW OUTPUT:
Error using csvwrite (line 47)
The input cell array cannot be converted to a matrix.
Error in sldd_to_csv (line 11)
csvwrite(‘SLDD_220817.csv’, NewData); I am trying to write the contents of a .mat file to a csv file. The .mat file was generated by exporting the Design Data from a simulink data dictionary file that is used in a Simulink model. I’ve tried to research how to extract the data from the .mat but haven’t been able to find anything significant. If you have any suggestions for strategies or functions I could use, please add a comment. Thanks.
CODE:
FileData = load(‘SLDD_220817.mat’);
NewData=struct2cell(FileData);
csvwrite(‘SLDD_220817.csv’, NewData);
CW OUTPUT:
Error using csvwrite (line 47)
The input cell array cannot be converted to a matrix.
Error in sldd_to_csv (line 11)
csvwrite(‘SLDD_220817.csv’, NewData); sldd, csvwrite MATLAB Answers — New Questions