Manipulate Excel from Matlab

1 回表示 (過去 30 日間)
Virginia
Virginia 2013 年 6 月 23 日
Hi, I want to know how can develope a code so it open phisically an Excel file, and then save the selected cell range that I'll selected with the mouse as a matrix in Matlab

採用された回答

Tom
Tom 2013 年 6 月 23 日
The -1 field allows you to use Excel interactively.
[num txt raw] = xlsread(fileName,-1);
  3 件のコメント
Tom
Tom 2013 年 6 月 23 日
I think you're looking at the raw data, rather than the numeric data (see the three outputs you get from XLSREAD)?
Otherwise, try:
cell2mat(data)
Virginia
Virginia 2013 年 6 月 23 日
I just did it, I just had to set the name of the variable for example
[K] = xlsread(comp,-1)
And that will save the range cell in matlab.
Thanks Tom!

サインインしてコメントする。

その他の回答 (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