source: trunk/src/read_imatext.m @ 211

Last change on this file since 211 was 19, checked in by gostiaux, 15 years ago

the private files have been moved down to the root folder

File size: 1000 bytes
RevLine 
[8]1%'read_imatext': reads the .civ file for image documentation (obsolete)
2% fileinput: name of the documentation file
3% time: matrix of times for the set of images
4%pxcmx: scale along x in pixels/cm
5%pxcmy: scale along y in pixels/cm
6function [error,time,TimeUnit,mode,npx,npy,pxcmx,pxcmy]=read_imatext(fileinput);
7error=0;%default
8time=[]; %default
9TimeUnit='s';
10mode='pairs';
11npx=[]; %default
12npy=[]; %default
13pxcmx=1;%default
14pxcmy=1;%default
15if exist(fileinput,'file')~=2, error=2, return;end;%input file does not exist
16dotciv=textread(fileinput);
17sizdot=size(dotciv);
18if ~isequal(sizdot(1)-8,dotciv(1,1));
19    error=1; %inconsistent number of bursts
20end
21nbfield=sizdot(1)-8;
22npx=(dotciv(2,1));
23npy=(dotciv(2,2));
24pxcmx=(dotciv(6,1));% pixels/cm in the .civ file
25pxcmy=(dotciv(6,2));
26% nburst=dotciv(3,1); % nbre of bursts
27abs_time1=dotciv([9:nbfield+8],2);
28dtime=dotciv(5,1)*(dotciv([9:nbfield+8],[3:end-1])+1);
29timeshift=[abs_time1 dtime];
30time=cumsum(timeshift,2);
Note: See TracBrowser for help on using the repository browser.