-
3 Comments
源樹 上林
on 13 Aug 2020
y = sum(x=='1');
Adam Boughrira
on 24 Oct 2020
Well, well! Here he/she is as well, great job continuing your copy and paste of the cheap and meaningless trick you prick!
In case you didn't know how to do it and wanted to know how -which somehow I doubt it for some reason!, but anyhow, here is one of MANY ways to do it:
function x=one(x),x=count(x,'1');end
Layale Bazzi
on 21 Nov 2020
y = length(find(x=='1'));
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!