edit-counting the numbers
이전 댓글 표시
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
Image Analyst
2012년 1월 25일
Because this doesn't make any sense to me, I think you need to check this out: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
kash
2012년 1월 25일
kash
2012년 1월 25일
TAB
2012년 1월 25일
What is "raw" ? Is it a cell array ?
kash
2012년 1월 25일
TAB
2012년 1월 25일
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}))
Walter Roberson
2012년 2월 4일
raw is the third output from an xlsread()
답변 (1개)
Sven Schoeberichts
2012년 1월 25일
0 개 추천
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 ))
카테고리
도움말 센터 및 File Exchange에서 Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!