Input and output in excel
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi
I would like to type in a couple of variables in excel as input in excel.
On the next sheet in the Excel file, I would like the outputs. There are both vectors and graphs I would like to display?
How can I do this?
All my files are on the Desktop.
0 Commenti
Risposte (1)
Garv Agarwal
il 10 Lug 2023
Hi Joel,
From my understanding, you want to input and output vectors and graph in an Excel sheet.
You can import data from an excel sheet by either using the Import Data button in the Home tab or by using the the readtable function -
data = readtable('file.xls')
If you want only a section of the data, then you can specify the range of the data to import -
data = readtable('file.xls','Range','A1:F4')
In order to write matrices and vectors into an excel file, you can use the writematrix function -
writematrix(data,'file.xls')
In order to export figures and plots to an excel sheet, you can use the MLGetFigure function. Write =MLGetFigure(width, height) in an Excel cell in order to copy the current open figure to that cell.
For more details, you can refer to the following documentations -
0 Commenti
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!