function [S] = readsens(filename, start, stop) %READSENS Read sensor datafile and put it in a matrix. % [S] = readsens(filename, start, stop) reads the data into matrix S % from sample to sample , or until the end of file. % % Kristof Van Laerhoven, kristof@comp.lancs.ac.uk path = []; if ~exist('filename'), [filename path]= uigetfile('*.txt','Pick a file:') end; fid = fopen([path filename],'r'); i = 1; S = []; while ~feof(fid) & stop>i, % read one vector into matrix S. Tmp = fgetl(fid); % check if we really have to convert this (start) if start