Input and output in excel

8 visualizaciones (últimos 30 días)
Joel
Joel el 11 de Abr. de 2023
Respondida: Garv Agarwal el 10 de Jul. de 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.

Respuestas (1)

Garv Agarwal
Garv Agarwal el 10 de Jul. de 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 -

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by