how to read excel data

1 visualización (últimos 30 días)
jimaras
jimaras el 30 de En. de 2014
Comentada: Azzi Abdelmalek el 30 de En. de 2014
Hello everyone,
I want to create a function which will read data from a given excel file and will return different vectors, each corresponding to a different vector (numerical data only). Do you have any idea?
thank you

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 30 de En. de 2014
To get numerical data
v=xlsread('your_file.xlsx')
  5 comentarios
jimaras
jimaras el 30 de En. de 2014
Editada: Azzi Abdelmalek el 30 de En. de 2014
and in the command window I set
filename='excelfile.xlsx';
Azzi Abdelmalek
Azzi Abdelmalek el 30 de En. de 2014
This doesn't make any sens, you are just replacing the function xlsread by Transformation. Just write
K=xlsread('yourfile.xls')
Then do whatever you want with the matrix K. And it's a bad idea to separate it to many vectors. If you want a third column, you can get it by
K(:,3)

Iniciar sesión para comentar.

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by