Rank: 1695 based on 34 downloads (last 30 days) and 2 files submitted
Personal Profile:
Professional Interests:
GPS, Navigation

 

Watch this Author's files

 

Files Posted by Chad View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
10 Sep 2007 Screenshot Date Conversion Utility GUI A GUI utility to compute calendar date, GPS time, Julian day, and day of the week Author: Chad Webb gps, gregorian, julian, calendar, time 8 3
  • 4.0
4.0 | 2 ratings
07 May 2007 Two's Complement Compute the two's complement value of an unsigned integer Author: Chad Webb twos complement, utility, compute, integer, unsigned 26 4
Comments and Ratings by Chad
Updated File Comments Rating
19 Nov 2008 untexlabel Build a string which used with a TeX interpreter shows exactly the string as it is ... Author: Giuseppe RidinĂ²

This utility works as advertised - as mentioned, only a select few text objects have the "Interpreter" property available, and this solves the case where that property is not available - I used it to properly display the underscores in a "waitbar" message. Nice work!

Comments and Ratings on Chad's Files View all
Updated File Comment by Comments Rating
22 Sep 2011 Date Conversion Utility GUI A GUI utility to compute calendar date, GPS time, Julian day, and day of the week Author: Chad Webb Leong, Shien Kwun

How does quant() work?

03 Aug 2011 Two's Complement Compute the two's complement value of an unsigned integer Author: Chad Webb Zelazowski, Przemyslaw

Similar to Jeremy, I don't see the functionality of the code if the input must be unsigned integer. Isn't the two's component mainly used to deal with negative numbers?

10 Dec 2010 Two's Complement Compute the two's complement value of an unsigned integer Author: Chad Webb Ghannoum, Anthony

Hello, I hope you don't mind, I modified it a bit to handle matrices, and overflows. Cheers !

function value = TwosComplement(x, numBits)
if ~isnumeric(x) || ~isnumeric(numBits) || nargin ~= 2
    error (' Function requires two numeric input arguments');
end
if numBits < 2
    error ('numBits should be at least 2 for a Twos Complement representation');
end
% Create MSB matrix (Shift right, and truncate remaining bits if any)
msb = mod(bitshift(x, -(numBits - 1) ),2);
% Calculate all positive values (Truncate the input)
value = mod(x,2^(numBits - 1));
% Calculate all negative values (Invert and add 1)
neg = -1 * ( bitcmp(mod(x, 2^(numBits -1)), numBits -1) + 1 );
% Use MSB matrix as a mask to choose either the positive or negative value
value(msb ~= 0)= neg(msb ~= 0);
end

30 Oct 2008 Two's Complement Compute the two's complement value of an unsigned integer Author: Chad Webb Jeremy

um...the 2's complement of an unsigned value is just the dec2bin function...what's the point if it's unsigned?

10 Aug 2008 Date Conversion Utility GUI A GUI utility to compute calendar date, GPS time, Julian day, and day of the week Author: Chad Webb g, kaspar

The function quant(.,.) is missing...

Top Tags Applied by Chad
calendar, compute, gps, gregorian, integer
Files Tagged by Chad View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
10 Sep 2007 Screenshot Date Conversion Utility GUI A GUI utility to compute calendar date, GPS time, Julian day, and day of the week Author: Chad Webb gps, gregorian, julian, calendar, time 8 3
  • 4.0
4.0 | 2 ratings
07 May 2007 Two's Complement Compute the two's complement value of an unsigned integer Author: Chad Webb twos complement, utility, compute, integer, unsigned 26 4

Contact us at files@mathworks.com