export output from a linear regression to Excel
Afficher commentaires plus anciens
Is it possible to export the output after having performed a linear regression to Excel? In other words, to export the variable generated in Workspace which contains the coefficients, R^2 and so on? Either exporting all properties contained in the variable/output at once or one property at a time? When copy-pasting the coefficients for instance to Excel, the variable names and column labels are not pasted into Excel which is quite annoying.
Réponse acceptée
Plus de réponses (1)
Marina Fernandez
le 21 Sep 2022
0 votes
Another option is to convert the model to text, separate it by rows and convert that to a cell in order to write the results of the model in excel format:
text_model = evalc('disp(model)');
split_text_model = split(text_model,char(10));
xlswrite(excel_path,cellstr(split_text_model),'results','A1');
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!