MATLAB: Programatically selecting cells in a uitable

MATLABuitable

How would I programatically select a cell, e.g., highlight row 3, column 2 in a uitable?
I found some 5+ year old answers using an obsolete version of uitable that no longer seem to work.
Edit: here is what I found that did not work:

Best Answer

I figured out the answer by further reviewing the long thread in my question. Here is some updated code that works at least until Matlab R2015b.
% m = numeric handle to uitable
m = uitable(...);
jUIScrollPane = findjobj(m);
jUITable = jUIScrollPane.getViewport.getView;
jUITable.changeSelection(row-1,col-1, false, false);
% subtract 1 from row and col you want selected
% the last two arguments do the following:
% false, false: Clear the previous selection and ensure the
% new cell is selected.
% false, true: Extend the previous selection (select a range of cells).
% true, false: Toggle selection
% true, true: Apply the selection state of the anchor to all cells
% between it and the specified cell.
Using combinations of the last two arguments, you can select any cells you want programatically, even if they're not contiguous.