AndroidのVideo captureにMATLABからアクセスする

ここを参考に
http://jp.mathworks.com/matlabcentral/answers/12036-how-do-i-use-my-smart-phone-camera-as-a-webcam-in-matlab

以下のIPカメラアプリをAndroidにインストール
https://play.google.com/store/apps/details?id=com.pas.webcam

url = 'http://<ip address>/shot.jpg';
ss  = imread(url);
fh = image(ss);
while(1)
    ss  = imread(url);
    set(fh,'CData',ss);
    drawnow;
end

Nexus5Xだと画像が上下逆さまになっていたので、flipdim()を2回使って反転する
http://jp.mathworks.com/matlabcentral/answers/10883-how-do-i-flip-mirror-image-an-image