How could I make a program where an excel file is a input?

1 回表示 (過去 30 日間)
Roger Vegeta
Roger Vegeta 2016 年 10 月 4 日
回答済み: KSSV 2016 年 10 月 4 日
I mean you have to tell the program just the name of the excel file. I know this doesn't work, but it can help you to understand what I mean.
function
P = input('excell name = ')
t = xlsread('P')
end

回答 (1 件)

KSSV
KSSV 2016 年 10 月 4 日
function t = readexel(filename)
if ~ischar(filename)
error('input hsould be a filename')
end
t = xlsread(filename)
end
You can try like the above.

カテゴリ

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