Changeset 227 for trunk/src/read_field.m
- Timestamp:
- Mar 31, 2011, 1:42:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_field.m
r221 r227 31 31 ParamOut=[]; 32 32 errormsg=''; 33 %FieldName=ParamIn.FieldName;34 33 VelType=ParamIn.VelType; 35 34 … … 42 41 end 43 42 test_civx=0; 44 if ~strcmp(ParamOut.FieldName,'get_field...')% if get_field is not requested, look for Civx data 43 ParamIn 44 if ~strcmp(ParamIn.FieldName,'get_field...')% if get_field is not requested, look for Civx data 45 45 FieldList=calc_field;%list of possible fields for Civx data 46 46 ParamOut.ColorVar='';%default 47 47 field_index=strcmp(ParamOut.FieldName,FieldList);%look for ParamOut.FieldName in the list 48 48 if isempty(find(field_index,1))% ParamOut.FieldName is not in the list, check whether Civx data exist 49 Data=nc2struct(ObjectName,'ListGlobalAttribute','absolut_time_T0','civ'); 49 'TESTnc1' 50 Data=nc2struct(ObjectName,'ListGlobalAttribute','absolut_time_T0','civ') 50 51 if ~isempty(Data.absolut_time_T0)&& ~isequal(Data.civ,0) 51 52 ParamOut.FieldName='velocity';%Civx data found, set .FieldName='velocity' by default … … 83 84 set(hhget_field.inputfile,'String',ObjectName) 84 85 set(hhget_field.list_fig,'Value',1) 86 if exist('num','var')&&~isnan(num) 87 set(hhget_field.TimeIndexValue,'String',num2str(num)) 88 end 85 89 funct_list=get(hhget_field.ACTION,'UserData'); 86 90 funct_index=get(hhget_field.ACTION,'Value'); … … 107 111 end 108 112 end 109 set(hhget_field.attributes,'String',Tabchar);%update list of global attributes in get_field113 %set(hhget_field.attributes,'String',Tabchar);%update list of global attributes in get_field 110 114 ParamOut.CivStage=0; 111 115 ParamOut.VelType=[]; 116 if isfield(Field,'TimeIndex') 117 ParamOut.TimeIndex=Field.TimeIndex; 118 end 119 if isfield(Field,'TimeValue') 120 ParamOut.TimeValue=Field.TimeValue; 121 end 112 122 end 113 123 if test_civx … … 127 137 A=read(ObjectName,num); 128 138 FieldName='image'; 129 catch 130 errormsg= lasterr;139 catch ME 140 errormsg=ME.message; 131 141 return 132 142 end … … 134 144 try 135 145 mov=aviread(ObjectName,num); 136 catch 137 errormsg= lasterr;146 catch ME 147 errormsg=ME.message; 138 148 return 139 149 end
Note: See TracChangeset
for help on using the changeset viewer.