How to add number of cells in a column and not the values in that cells?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a file with single column and 365 rows. The file is attached with this. I have to check the data stored in each cell whether it is <=0 or not. If the data stored in cell is <=0, I have to count that total number of cells (not the addition of values in those cells) and store it in any variable. Kindly, help me regarding this.
Thanks & Regards
0 Kommentare
Akzeptierte Antwort
Hikaru
am 5 Feb. 2015
V = xlsread('Book1.xlsx');
c = V <= 0; % check the condition
ans = sum (c) % count total number of cells
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices 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!