Code covered by the BSD License  

Highlights from
Thar ABPR-20 RS232 communication via handheld emulation

Thar ABPR-20 RS232 communication via handheld emulation

by

 

20 May 2013 (Updated )

Controls and reads from a Thar ABPR-20, by emulating the handheld controller.

istharbprobjprofile(input)
function response = istharbprobjprofile(input)
% ISTHARBPROBJPROFILE checks that the supplied profile is valid

% checks the number of arguments
error(nargchk(1, 1, nargin))

% if it was a cell array, recursively call this
if iscell(input)
    % call this function recursively
    response = cellfun(@istharbprobjprofile, 'UniformOutput', 'false');
    
else
    % it must be 'A' or 'B' only
    response = isequal(input, 'A') || isequal(input, 'B');
end

Contact us