How can I import a specific matrix from an excel file using the xlsread command?

58 ビュー (過去 30 日間)
Erik
Erik 2014 年 11 月 6 日
コメント済み: Erik 2014 年 11 月 6 日
I am trying to import a 3x301 matrix from excel into matlab. The value in column A for each of the three rows is not to be imported. So I have tried:
heightdata = xlsread('Height Data.xlsx','B3:B5,B:KP')
But it returns a 3x1 matrix consisting of only the values in column B. I need to extend this matrix out using these rows through all of the values in column KP but can not seem to figure it out. I have attached the excel file.
I'm sure there is something simple I am forgetting or messing up so any help would be greatly appreciated.
Thanks,
Erik

採用された回答

Matt Tearle
Matt Tearle 2014 年 11 月 6 日
You need to use standard Excel indexing "topleft:bottomright":
heightdata = xlsread('Height Data.xlsx','B3:KP5');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by