フィルターのクリア

Counting the number of empty cells per 30 cells in excel with various lenght of data

3 ビュー (過去 30 日間)
A T
A T 2017 年 2 月 20 日
I want to compare multiple data sets, that have different lengts. I want to extract from an excel file how many rows (with a step of 30 cells) in a single column contains text. My current code for this:
k=30;
n=29;
x2 = ending(:,a);
[num,txt,raw] = xlsread(filename,sheet,'M2:M5710');
f_1 = 1;
for ii=1:k:x2;
No_empty(:,f_1)=sum(~cellfun(@isempty,txt(ii:ii+n)),1);
f_1 = f_1 + 1;
end
Here starts the problem, the x2 is different for different excel files. So I cannot store the data in a matrix.
And no I cannot add 0 to the shorter data, I use the numbers for further calculations.
I tried with cell arrays, but then I got stuck in doing further calculations and plotting. So any hint is helpful at this point.

回答 (0 件)

カテゴリ

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