how to use excel data in matlab?

I know I can use
num = xlsread(filename, sheet, range)
to get data from excel file.
But my project will get more data as time goes on.
So I need to know how I can adjust my range as more data to be upload for matlab.
for instance at month 1 my data would be 3 5 7 and I should upload these data to get mean value. and month 2 data would be 3 5 7 9 11 and I should upload all these data to get mean value.
Can I do this in matlab?

 採用された回答

Image Analyst
Image Analyst 2012 年 11 月 25 日

0 投票

Either leave out range altogether to get everything, or set the range to a specific range with sprintf():
range = sprintf('R%dC%d', rowNumber, columnNumber);
num = xlsread(filename, sheet, range);

1 件のコメント

Jay
Jay 2012 年 11 月 26 日
Is there a way matlab know how many cells(n) it used in range? Because I need to divide total over n n is diffrent over time

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

その他の回答 (0 件)

質問済み:

Jay
2012 年 11 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by