function GUI_input=FFT(hget_field) global spec x_vec %requests for the visibility of input windows in the GUI series (activated directly by the selection in the menu ACTION) if ~exist('hget_field','var') GUI_input={'check_1Dplot','y';...% 'check_scalar','n';... % 'check_vector','n'... % }; return %exit the function end %initiation hhget_field=guidata(hget_field); % testinterp=0; abscissa_list=get(hhget_field.abscissa,'String'); val=get(hhget_field.abscissa,'Value'); val=val(1); abscissa_name=abscissa_list{val}; ordinate_list=get(hhget_field.ordinate,'String'); val=get(hhget_field.ordinate,'Value'); val=val(1); %take only the first variable in the list %ordinate_name=Field.ListVarName{val}; ordinate_name=ordinate_list{val}; [Field,errormsg]=read_get_field(hget_field); if ~isempty(errormsg) msgbox_uvmat('ERROR',['error in get_field/FFT input:' errormsg]) return end % get variable eval(['Var= Field.' ordinate_name ';']); np=size(Var); np_freq=floor(np(1)/2); dx=1;%default dfreq=1/np(1);%default frequency interval (abscissa= array index) if ~isequal(abscissa_name,'') eval(['Coord_x= Field.' abscissa_name ';']); ind_select=find(~isinf(Coord_x));%detect infinite values Coord_x=Coord_x(ind_select); Var=Var(ind_select,:); diff_x=diff(Coord_x); dx=min(diff_x); %interpolate on a regular abscissa interval if needed if (max(diff_x)-dx)> 0.001*dx || numel(ind_select)