frequency.m
上传用户:mgf822
上传日期:2022-06-06
资源大小:51k
文件大小:0k
- function f=frequency(vector)
- % if ~isa(vecor,'uint8')
- % error('input argument must be a uint8 vector');
- % end
- f=repmat(0,1,256);
- len=length(vector);
- for index=0:255
- f(index+1)=sum(vector==uint8(index));
- end
- f=f./len;