Hi Andrew,
Assuming you are using the SimBiology app, you can do this by right-clicking on the simulation plot and selecting 'Export Data':
Then you can select to export directly to .xls:
If you want to export the data from a SimData object in the MATLAB workspace, you could use code along the lines of:
datanames = tobj.DataNames;
datanames = replace(datanames,' ','_');
dataTable = array2table(tobj.Data,'VariableNames',datanames);
timeTable = array2table(tobj.Time,'VariableNames',{'Time'});
exportTable = [timeTable dataTable];
writetable(exportTable,'exportData.xls')
Let me know how you get on.
1 Comment
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/462514-data-extraction-from-simbiology-simulations#comment_824170
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/462514-data-extraction-from-simbiology-simulations#comment_824170
Sign in to comment.