Rev | Line | |
---|
[504] | 1 | % 'FFT': calculate and display spectrum of the field selected in the GUI get_field |
---|
| 2 | % GUI_input=FFT(hget_field) |
---|
| 3 | % |
---|
| 4 | % OUTPUT: |
---|
| 5 | % GUI_input: option for display in the GUI get_field |
---|
| 6 | % |
---|
| 7 | %INPUT: |
---|
| 8 | % hget_field: handles of the GUI get_field |
---|
| 9 | % |
---|
| 10 | |
---|
| 11 | function SubField=FFT2(hget_field) |
---|
| 12 | %% set the input elements needed on the GUI get_field when the action is selected in the menu ActionName |
---|
| 13 | if ~exist('hget_field','var') % case with no input parameter |
---|
| 14 | SubField={'CheckPlot1D','off';...% enable simple x/y plot ('off'/'on') |
---|
| 15 | 'CheckScalar','on';...% enable scalar selection('off'/'on') |
---|
| 16 | 'CheckVector','off'; ...% enable vector selection('off'/'on') |
---|
| 17 | '',''}; |
---|
| 18 | return |
---|
| 19 | end |
---|
| 20 | %%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 21 | |
---|
| 22 | [SubField,errormsg]=read_get_field(hget_field); |
---|
| 23 | SubField |
---|
| 24 | for ilist=1:numel(SubField.ListVarName) |
---|
| 25 | if isfield(SubField.VarAttribute{ilist},'Role') && isequal(SubField.VarAttribute{ilist}.Role,'scalar') |
---|
| 26 | VarName=SubField.ListVarName{ilist}; |
---|
| 27 | spec=abs(fft2(SubField.(VarName)-mean(mean(SubField.(VarName))))); |
---|
| 28 | SubField.(VarName)=log(spec); |
---|
| 29 | end |
---|
| 30 | end |
---|
| 31 | |
---|
| 32 | if ~isempty(errormsg) |
---|
| 33 | msgbox_uvmat('ERROR',['error in read_get_field input:' errormsg]) |
---|
| 34 | return |
---|
| 35 | end |
---|
| 36 | SubField |
---|
| 37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.