Code covered by the BSD License  

Highlights from
Passive Mode FTP in MATLAB

from Passive Mode FTP in MATLAB by Idin Motedayen
These files allow users to use passive mode FTP in MATLAB.

pasv(h)
function pasv(h)
% PASV Change to passive mode
%   PASV(FTP) changes the communication mode of FTP to passive mode.

% Idin Motedayen-Aval

% Make sure we're still connected.
connect(h)

if (nargin ~= 1)
    error('Incorrect number of arguments.')
end

h.jobject.enterLocalPassiveMode;

% There isn't an easier way to set the value of a StringBuffer.
h.passiveMode.setLength(0);
h.passiveMode.append('p');

Contact us at files@mathworks.com