Code covered by the BSD License
 break_into_digits(input_i...Break an integer into thousand, hundreds, etc.
 break_into_digits(input_i...Break an integer into thousand, hundreds, etc.
 create_odometer_images(de...Creates odometer digit images.
 create_odometer_images(de...Creates odometer digit images.
 date_odometer_demo
Demonstrates the use of the date_odometer class.
 isbetween(a, b, c, vararg...
 isbetween(a, b, c, vararg...
 isdatenum(test_datenum)
Is this a reasonable datenum?
 isdatenum(test_datenum)
Is this a reasonable datenum?
 iswhole(varargin)
function tf = iswhole(varargin)
 iswhole(varargin)
function tf = iswhole(varargin)
 num_dims(X)
Returns the number of dimensions of matrix X; like "ndims" but will report a 1 X m vector as having one dimension.
 num_dims(X)
Returns the number of dimensions of matrix X; like "ndims" but will report a 1 X m vector as having one dimension.
 retrieve_odometer_digit_i...Finds & reads the image data corresponding to an odometer digit.
 retrieve_odometer_digit_i...Finds & reads the image data corresponding to an odometer digit.
 which_digits_change(date_...Returns a vector of which digits changed between date_1 & date_2.
 which_digits_change(date_...Returns a vector of which digits changed between date_1 & date_2.
 date_odometerclassdef date_odometer < handle
 date_odometerclassdef date_odometer < handle
 odometer_digitclassdef odometer_digit < handle
 odometer_digitclassdef odometer_digit < handle
 odometer_textclassdef odometer_text < handle
 odometer_textclassdef odometer_text < handle

View all files
Date Odometer class
by
Kevin J. Delaney
12 Apr 2011
(Updated
14 Apr 2011)
Add an odometerlike object to a plot to show the progression of time.

iswhole(varargin)

%function tf = iswhole(varargin)
%
function [d,ndx,varout] = iswhole(varargin)
% ISWHOLE True for integers(whole numbers).
% ISWHOLE(X) is 1 for the elements of X that are integers, 0 otherwise.
% ISWHOLE(X1,X2,..,XN) returns a 1byN array with 1 for integers and 0
% otherwise.
% ISWHOLE does not check for integer data type as does ISINTEGER.
% Mukhtar Ullah
% mukhtar.ullah@informatik.unirostock.de
% University of Rostock
% November 15, 2004
%%%%%%%%%%%%%%%%%%%%%
% Adapted SLIGHTLY from the original version of iswhole() by Mukhtar
% Josef Lotz
% Portland State University
% February 276, 2007
C = varargin;
nIn = nargin;
if nIn < 2
d = C{:} == round(C{:});
else
d = zeros(1,nIn);
for i = 1:nIn
d(i) = isequal(C{i},round(C{i}));
end
end
% Line added to retrieve the indices of the whole number
ndx = find(d);
temp = [C{:}];
% As well as a vector of whole numbers found
varout = temp(ndx);


Contact us