Changeset 944 for trunk/src/transform_field
- Timestamp:
- May 20, 2016, 6:19:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/transform_field/signal_spectrum.m
r924 r944 80 80 DataOut.TransformInput.IndexRange(ilist,1:2)=str2num(answer{ilist+1}); 81 81 end 82 if DataOut.TransformInput.IndexRange(1,2)-DataOut.TransformInput.IndexRange(1,1)<DataOut.TransformInput.WindowLength 83 msgbox_uvmat('ERROR','WindowLength must be smaller than the total time index range') 84 return 85 end 86 huvmat=findobj(allchild(0),'Tag','uvmat'); 87 UvData=get(huvmat,'UserData'); 88 Data=UvData.PlotAxes; 89 YName=Data.ListVarName{1}; 90 XName=Data.ListVarName{2}; 91 yindex=DataOut.TransformInput.IndexRange(2,:); 92 y=Data.(YName)(yindex); 93 xindex=DataOut.TransformInput.IndexRange(3,:); 94 x=Data.(XName)(xindex); 95 haxes=findobj(huvmat,'Tag','PlotAxes'); 96 axes(haxes); 97 hbounds=findobj(haxes,'Tag','Bounds'); 98 if isempty(hbounds) 99 hbounds=rectangle('Position',[x(1) y(1) x(2)-x(1) y(2)-y(1)],'Tag','Bounds'); 100 else 101 set(hbounds,'Position',[x(1) y(1) x(2)-x(1) y(2)-y(1)]) 102 end 82 103 end 83 104 return … … 90 111 91 112 %% get the variable to process 113 if ~isfield(DataIn,Param.TransformInput.VariableName) 114 return 115 end 92 116 Var= DataIn.(Param.TransformInput.VariableName);%variable to analyse 93 117 if isfield(Param.TransformInput,'IndexRange') … … 128 152 end 129 153 130 %% c laculate the spectrum154 %% calculate the spectrum 131 155 specmean=0;% mean spectrum initialisation 132 156 cospecmean=0;
Note: See TracChangeset
for help on using the changeset viewer.