⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zhist.m

📁 Lattice coding and decoding
💻 M
字号:
function varargout = zhist(x);%ZHIST Integer histogram%   ZHIST(X) plots the histogram of the vector x; x must be all integer%   vector.%%   [Y,Z] = ZHIST(X) returns unique vector Y of vector X; Z is the%   vector of counts of X.%%   [Y,Z,H] = ZHIST(X) same as above, but also gives uniqe vector of%   histogram values H.%%   Example:%       x = [-1 -1 -2 0 1 1 2 2 3 9 14 23 14 11 31 31 31 22 22 22]';%       zhist(x)%       [y,z,h] = zhist(x)%%   See also HIST, UNIQUE.%   Copyright 2001-2003 Kamil Anis, anisk@feld.cvut.cz%   Dept. of Radioelectronics, %   Faculty of Electrical Engineering%   Czech Technical University in Prague%   $Revision: 0.1 $  $Date: 2003/1/16 17:33:28 $%   --%   <additional stuff goes here>m1 = min(x);m2 = max(x);bins = [m1:m2 + 1];h = hist(x,bins);x_counts = h(find(h ~= 0))';x_unique = unique(x);h_unique = unique(h)';if nargout == 0	bar(x_unique,x_counts);	set(gca,'XTick',x_unique,'YTick',h_unique);else	varargout = {x_unique,x_counts,h_unique};end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -