Changeset 8744
- Timestamp:
- 06/28/11 14:33:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/m/utils/Exp/readwrite/expread.m ¶
r8726 r8744 57 57 %Get number of nods and density 58 58 A=fscanf(fid,'%f %f',[1 2]); 59 if whole==1, 60 Struct(count).nods=A(1); 61 else 62 Struct(count).nods=A(1)-1; 63 end 59 Struct(count).nods=A(1); 64 60 Struct(count).density=A(2); 65 61 … … 75 71 if(Struct(count).nods~=length(Struct(count).x))error(['Profile ' num2str(count) ' reports incorrect length']); end; 76 72 77 %skip last coordinate if whole=0, 78 if whole==0, fscanf(fid,'%f %f',[1 2]); end 73 %Check if closed 74 if (Struct(count).nods > 1) && ... 75 (Struct(count).x(end) == Struct(count).x(1)) && ... 76 (Struct(count).y(end) == Struct(count).y(1)) 77 Struct(count).closed=true; 78 %skip last coordinate if whole=0, 79 if whole==0 80 Struct(count).nods=Struct(count).nods-1; 81 Struct(count).x =Struct(count).x(1:end-1,1); 82 Struct(count).y =Struct(count).y(1:end-1,1); 83 end 84 else 85 Struct(count).closed=false; 86 end 79 87 80 88 end
Note:
See TracChangeset
for help on using the changeset viewer.