Changeset 9078
- Timestamp:
- 07/19/11 16:36:57 (14 years ago)
- Location:
- issm/trunk/src/m
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/model.m
r9077 r9078 372 372 end 373 373 end% }}} 374 function temp = template() % {{{ 375 376 %Get default fields 377 md=model(0); 378 modelprops=properties('model'); 379 380 %build output 381 temp=struct(); 382 for i=1:length(modelprops), 383 temp.(modelprops{i})=md.(modelprops{i}); 384 end 385 386 end% }}} 374 387 end 375 388 methods -
issm/trunk/src/m/model/marshall.m
r8967 r9078 17 17 18 18 %automatically marshall model md, using template information available from an empty model class. 19 template= struct(model(0));19 template=model.template(); 20 20 fields=fieldnames(template); 21 21 for i=1:length(fields),
Note:
See TracChangeset
for help on using the changeset viewer.