edit-counting the numbers
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have some value in a dataset
raw=
>50K
>=50K
>50K ;
;
;
;
;
<=50K
A=sum( strcmp('>50K', raw) )
A2=sum( strcmp('<=50K', raw) )
BUT I GET A ,A2 as zero ,such that i have 32000 rows
7 Kommentare
TAB
am 25 Jan. 2012
I don't know what is "raw" and what is it's dimensions.
But try
A=sum(strcmp('>50K', raw{1}))
A2=sum(strcmp('<=50K', raw{1}))
Antworten (1)
Sven Schoeberichts
am 25 Jan. 2012
I still don't know if you have strings in that dataset or values, but this should give you a starting point:
length( find( dataset == value ))
0 Kommentare
Siehe auch
Kategorien
Mehr zu Logical 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!