Ignore:
Timestamp:
May 20, 2016, 6:19:16 PM (8 years ago)
Author:
sommeria
Message:

merge_proj_polar updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/transform_field/signal_spectrum.m

    r924 r944  
    8080            DataOut.TransformInput.IndexRange(ilist,1:2)=str2num(answer{ilist+1});
    8181        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
    82103    end
    83104    return
     
    90111
    91112%% get the variable to process
     113if  ~isfield(DataIn,Param.TransformInput.VariableName)
     114    return
     115end
    92116Var= DataIn.(Param.TransformInput.VariableName);%variable to analyse
    93117if isfield(Param.TransformInput,'IndexRange')
     
    128152end
    129153
    130 %% claculate the spectrum
     154%% calculate the spectrum
    131155specmean=0;% mean spectrum initialisation
    132156cospecmean=0;
Note: See TracChangeset for help on using the changeset viewer.