% set_get.m
redis = py.importlib.import_module('redis');
R = redis.Redis(pyargs('host','localhost','port',int64(12987),...
                       'decode_responses',py.True));
try
  R.ping();
  fprintf('Connected to server.\n')
catch EO
  fprintf('Is Redis running?  Unable to connect: %s\n', EO.message)
end

R.set('sensor_T712_temperature', 39.8);
retrieved_temp = R.get('sensor_T712_temperature');
fprintf('sensor_T712_temperature = %s\n', string(retrieved_temp))
as_number = double(string(retrieved_temp));
fprintf('(as a number)           = %6.3f\n', as_number)
