필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
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 CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by