Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
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.

Antworten (0)

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by