简体   繁体   English

如何从matlab中的excel文件中读取数据?

[英]how to read data from excel file in matlab?

I need to read data from my excel file in MATLAB, i need to read all the columns and rows , but i don't want the headers of the columns, ie i need to start reading the data from second row onwards with all columns. 我需要在MATLAB中读取我的excel文件中的数据,我需要读取所有列和行,但我不想要列的标题,即我需要从所有列开始从第二行开始读取数据。 can someone help me in this ? 有人可以帮助我吗? my excel file look like this : 我的excel文件看起来像这样:

excel文件图像

the image is just for clarification , if you want my excel file i can attach that too. 图像只是为了澄清,如果你想要我的excel文件,我也可以附加它。

i tried the following code but it also gives the headers text and the empty columns text 我尝试了以下代码,但它也提供了标题文本和空列文本

filename = 'C:\\Users\Zeeshan\Desktop\box_annotation.xlsx';
[subsetA txt]= xlsread(filename)

Try this if it works 如果它有效,试试这个

delimiter='';
A =importdata('Filename.xlsx',delimiter,1);

%Then to access the data, command can be given
A.data

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM