function show_rap(name1) %function show_rap(name1) %will show contents of 1 rtap-file disp ('-------------------'); END_OF_SENTENCE =-1; ff1=fopen(name1,'r','b'); % big endian files perframe = fread(ff1,1,'int'); sent=0; frame=0; % init empty matrices w/ probas X1=[]; while (~feof(ff1)) sentid = fread(ff1,1,'int'); % if end of sentence, plot and wait ! if (sentid == END_OF_SENTENCE) size(X1) frame figure(1);plot (0:frame-1,X1'); figure(2); % couple of trajectories n=29; subplot (511); plot (0:frame-1,X1(:,n)); n=28; subplot (512); plot (0:frame-1,X1(:,n)); n=27; subplot (513); plot (0:frame-1,X1(:,n)); n=26; subplot (514); plot (0:frame-1,X1(:,n)); n=25; subplot (515); plot (0:frame-1,X1(:,n)); pause % make other necessary things at the end of a sentence X1=[]; frame = 0; sent=sent+1; continue; end % ok, read the data x = fread(ff1,[1 perframe],'float'); X1 = [X1; x]; frame = frame +1; end fclose (ff1);