Azzera filtri
Azzera filtri

Input and output in excel

11 visualizzazioni (ultimi 30 giorni)
Joel
Joel il 11 Apr 2023
Risposto: Garv Agarwal il 10 Lug 2023
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.

Risposte (1)

Garv Agarwal
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 -

Tag

Prodotti


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by