Changeset 2394
- Timestamp:
- 10/08/09 09:12:58 (15 years ago)
- Location:
- issm/trunk/src/m/classes/@pairoptions
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/@pairoptions/changefieldvalue.m
r2392 r2394 4 4 % Usage: 5 5 % pairoptions=changefieldvalue(pairoptions,field,newvalue) 6 % 7 % the value associated with all the fields equal to the one given in 8 % input will be modified. If no field is foud, the field will be to 9 % the option list added 6 10 7 11 %track occurance of field … … 9 13 10 14 %replace value 11 for i=1:length(lines), 12 pairoptions.list{lines(i),2}=newvalue; 15 if isempty(lines), 16 %add new field if not found 17 pairoptions=addfield(pairoptions,field,newvalue); 18 else 19 for i=1:length(lines), 20 pairoptions.list{lines(i),2}=newvalue; 21 end 13 22 end
Note:
See TracChangeset
for help on using the changeset viewer.