clear; clc; %add Thew source directory to matlab search path addpath(fullfile(pwd, 'src')); %add sFtpThew library to Java class path sFtpAddDynPath(fullfile(pwd, 'src','sFtpThew.jar')); %connect to sFtp server userName = 'XXXXXXXXXXXX'; % Enter your username hostName = 'ftp-thew.urmc.rochester.edu'; password = 'XXXXXXXXXXXX'; % Enter your password [sFtpClient, Channel] = sFtpConnect(userName, hostName, password); %list content of root directory FolderCont = sFtpLs( sFtpClient, '.' ); %read annotation file from sFtp server fileName = '/E-HOL-12-0140-008/1042_20080117070016.ann'; endPos = 10000; [ihsneHeader, Ann, Rloc, RR] = sFtpRead_binAnn(fileName, sFtpClient, endPos); %read ECG data file from sFtp server [ishneHeader, ecgSig] = sFtpRead_ishne('/E-HOL-12-0140-008/1042_20080117070016.ecg', sFtpClient, 1, 1); %disconnect from sFtp server [sFtpClient, Channel] = sFtpDisconnect(sFtpClient, Channel); %plot ECG data close; plot(ecgSig(:,9));