フィルターのクリア

Help: Excel manipulation in Matlab

2 ビュー (過去 30 日間)
Khanh
Khanh 2014 年 9 月 16 日
編集済み: Khanh 2014 年 9 月 17 日
Hi,
I have some questions and hope somebody help me. I'm working with excel input data. It's in colum A, B, C , D, etc. The number of colums is not specified. It depends on users. How could I know the number of the colums on each different situation? And with a same "for loop" statement, how could I automatically execute with colums A, B, C, etc.
Khanh

採用された回答

Iain
Iain 2014 年 9 月 16 日
You probably don't need a for loop:
The function "xlsread" reads in the contents of an entire sheet (ALL columns), by default, but you can also set it up so that it makes you select the region of pixels to be imported to matlab.
What you do with your 3 matrices of values & text is up to you.
[numbersonly textonly everything] =xlsread(filename,sheetno);
  2 件のコメント
Khanh
Khanh 2014 年 9 月 16 日
Thanks so much.
Khanh
Khanh 2014 年 9 月 17 日
編集済み: Khanh 2014 年 9 月 17 日
Hi lain,
Instead of using xlsread(filename, -1) to choose interactively any region of data, how could I use the following function with a variable of colum?
inputdata=xlsread('c:\thm.xlsx','sheet1','c4:c(a)')
Where, a is a colum variable. It may be 1, 2, 3, 4 or whatever. Are there any ways to execute the above function?
Khanh.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by