how to import the output of a function displayed
3 views (last 30 days)
John BG on 5 Oct 2017
Edited: John BG on 5 Oct 2017
this is John BG <mailto:email@example.com firstname.lastname@example.org>
Let be your data for instance
1. choose the Excel file
2. define what sheet to write on, for instance 2nd page
3. define the start point of the range to write in the Excel file
4. write it
if you find this answer useful would you please be so kind to consider marking my answer as Accepted Answer?
To any other reader, if you find this answer useful please consider clicking on the thumbs-up vote link
thanks in advance
More Answers (2)
Marco on 5 Oct 2017
Hello, to export a table in the workspace to a Microsoft® Excel® spreadsheet file, use the writetable function. You can export data from the workspace to any worksheet in the file, and to any location within that worksheet.
You can see the documentation at this link: https://it.mathworks.com/help/matlab/import_export/exporting-to-excel-spreadsheets.html BR Marco
Walter Roberson on 5 Oct 2017
Assign the output to a variable if possible.
If the output is just be displayed, such as through disp() or fprintf(), then best is to modify the function to return the information.
If it is just being displayed and modifying the function is not practical, then use evalc() to capture the output as text, after which you can split it into lines and str2double() it.