function [ w ] = hammingweight( x )
%bsc Summary of this function goes here
%   Detailed explanation goes here

y = x ~= 0 ;
w = sum(sum(y)) ;

end

