Changeset 3569
- Timestamp:
- 04/19/10 14:26:25 (15 years ago)
- Location:
- issm/trunk/src/m/utils/Array
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/Array/item2str.m
r33 r3569 17 17 svec=num2str(a); 18 18 else 19 warning('item2str:item_unrecog',... 20 'Item ''%s'' is of unrecognized type ''%s''.',... 21 inputname(1),class(a)); 19 if ~isempty(inputname(1)) 20 warning('item2str:item_unrecog',... 21 'Item ''%s'' is of unrecognized type ''%s''.',... 22 inputname(1),class(a)); 23 else 24 warning('item2str:item_unrecog',... 25 'Item %d is of unrecognized type ''%s''.',... 26 1,class(a)); 27 end 22 28 return 23 29 end -
issm/trunk/src/m/utils/Array/string_dim.m
r33 r3569 16 16 end 17 17 if (idim > numel(a)) 18 error('Index %d exceeds number of elements in ''%s''.',... 19 idim,inputname(1)); 18 if ~isempty(inputname(1)) 19 error('Index %d exceeds number of elements in array ''%s''.',... 20 idim,inputname(1)); 21 else 22 error('Index %d exceeds number of elements in array %d.',... 23 idim,1); 24 end 20 25 end 21 26 -
issm/trunk/src/m/utils/Array/struc_desc.m
r3093 r3569 7 7 8 8 if ~isfield(sarray,'descriptor') 9 error(['Field ''descriptor'' not found in array ''' inputname(1) '''.']); 9 if ~isempty(inputname(1)) 10 error('Field ''descriptor'' not found in array ''%s''.',inputname(1)); 11 else 12 error('Field ''descriptor'' not found in array %d.',1); 13 end 10 14 end 11 15
Note:
See TracChangeset
for help on using the changeset viewer.