Changeset 24856
- Timestamp:
- 05/15/20 14:27:50 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/scripts/ol.m
r22895 r24856 1 function ol(varargin) 1 2 2 %Open runme.m file and read line by line 3 fid=fopen('runme.m','r'); 3 options=pairoptions(varargin{:}); 4 4 5 tline = fgets(fid); 6 count=1; 7 while ischar(tline) 5 range=getfieldvalue(options,'<',Inf); 6 7 %Open runme.m file and read line by line 8 fid=fopen('runme.m','r'); 9 8 10 tline = fgets(fid); 9 if strncmpi(tline,'if perform(org,',14), 10 lastchar = strfind(tline,')'); 11 lastchar = lastchar(end)-1; 12 disp(sprintf('%2i: %s',count,tline(16:lastchar))); 13 count=count+1; 11 count=1; 12 while ischar(tline) 13 tline = fgets(fid); 14 if strncmpi(tline,'if perform(org,',14), 15 lastchar = strfind(tline,')'); 16 lastchar = lastchar(end)-1; 17 disp(sprintf('%2i: %s',count,tline(16:lastchar))); 18 if count>range, 19 break; 20 end 21 count=count+1; 22 end 14 23 end 15 end 24 fclose(fid);
Note:
See TracChangeset
for help on using the changeset viewer.