assess the xlread in elsefi command

xlread is used to read xls files i want to use this command in ifelse condiations
if input==a
B=AS
elseif
B=AQ
it means that xlread the column AS
how i generate the code for above algorithm
columnB = xlsread(filename,'B:B')
[EDITED, Jan, please format the code properly, thanks]

 採用された回答

Jan
Jan 2015 年 3 月 16 日

0 投票

if strcmp(in, 'a')
B = 'AS';
else % not elseif
B = 'AQ';
end
columnB = xlsread(filename, [B, ':', B]);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEnvironment and Settings についてさらに検索

タグ

質問済み:

2015 年 3 月 16 日

回答済み:

Jan
2015 年 3 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by