Unformatted text preview: % d = d(:); % Make sure d is a column vector. d if (nargin<2) n=1; % Need at least one digit even for 0. else if prod(size(n))~=1 | n<0, error('N must be a positive scalar.'); end n = round(n); % Make sure n is an integer. end; e [f,e]=log2(max(d)); % How many digits do we need to represent the numbers? bits=rem(floor(d*pow2(1-max(n,e):0)),2);...
View Full Document
This note was uploaded on 09/15/2011 for the course EE 150 at USC.