Counting the number of empty cells per 30 cells in excel with various lenght of data
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!