Same dimension for num and txt in xlsread
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
when I read in an excel file using xlsread, I'd like to have the outputs 'num' and 'txt' to have the same dimensions. It seems to me that by default, they chop off parts on the fringe that either don't contain numerics or text. It's convenient to have the same dimensions for reference purposes. For example, txt(1,2) should give me cell B1, and num(1,2) should also give me cell B1 in the original excel file.
Thanks, Christian
2 件のコメント
Kirby Fears
2015 年 12 月 11 日
編集済み: Kirby Fears
2015 年 12 月 11 日
Have you tried using the raw output of xlsread (output argument 3)? You can extract numerical and text data all from one object if you already know where (cell ranges) to find it.
[num,text,raw] = xlsread('myfile.xlsx');
回答 (1 件)
Walter Roberson
2015 年 12 月 12 日
one_location = find( cellfun(@(C) isequal(C, 1), raw(:,1)) );
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!