Rank: 1409 based on 51 downloads (last 30 days) and 3 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
16 May 2013 TransposeMat - like transpose, but handles N-D arrays Transposes the rows/columns (only) on any N-dimensional array Author: Chad Webb simulation, optimization, earth science, data exploration, matrix 6 1
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 11 4
  • 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 34 4
Comments and Ratings by Chad View all
Updated File Comments Rating
27 Mar 2012 Get structure field names in recursive manner Returns the field names of a structure, include the field names of any "sub-structures". Author: Adam

Saved me the hassle of writing it. Worked great right out of the box. Haven't tested on arrays of structs yet, but meets my current needs. Thanks!

27 Mar 2012 Get structure field names in recursive manner Returns the field names of a structure, include the field names of any "sub-structures". Author: Adam

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
17 May 2013 TransposeMat - like transpose, but handles N-D arrays Transposes the rows/columns (only) on any N-dimensional array Author: Chad Webb Simon, Jan

This would be a more compact one-liner:

out = permute(in, [2, 1, 3:ndims(in)]);

08 May 2012 Date Conversion Utility GUI A GUI utility to compute calendar date, GPS time, Julian day, and day of the week Author: Chad Webb Bartlett, Kevin

The time-conversion routines for GPS time look really useful, but I need to call them from within other programs, not via a GUI.

Have you considered creating a utc2gps() function that would take a Matlab-format time and convert it to GPS time? A gps2utc() companion function could convert back the other way. (files of these names already exist on FileExchange, but the author hard-coded leap seconds rather than using an algorithm, so it would have to be updated as years go by).

I would write this code myself, but

(a) I don't want to steal your thunder; and

(b) I'd rather somebody else did the work for me!

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

Top Tags Applied by Chad
calendar, compute, data exploration, earth science, gps
Files Tagged by Chad View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
16 May 2013 TransposeMat - like transpose, but handles N-D arrays Transposes the rows/columns (only) on any N-dimensional array Author: Chad Webb simulation, optimization, earth science, data exploration, matrix 6 1
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 11 4
  • 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 34 4

Contact us