📄 wlbrowser.m
字号:
function WLBrowser
% WLBrowser -- WaveLab Browser
% Usage
% WLBrowser
% Inputs
% none
% Outputs
% none
%
% Description
% The WaveLab Browser implements a point-and-click
% interface to WaveLab functions.
%
disp('***********************************************')
disp('* WaveLab Browser *')
disp('***********************************************')
st = '----------------------------------------------------';
disp(' ' )
disp('This WaveLab MATLAB program lets you try out standard')
disp('Wavelet Analysis techniques on standard or synthetic data sets.')
disp(' ')
disp('Here is a summary of how to use the menus:')
disp(' ')
disp(st)
disp('Data: Load data from WaveLab''s standard data sets:')
disp(' (Caruso, Laser, Sunspots, Seismic, ESCA, HochNMR, RaphaelNMR)')
disp(' ')
disp(st)
disp('Signals: Use a built-in artificial signal')
disp(' (Bumps, Blocks, LinChirp, TwoChirp, ...)')
disp(' ')
disp('Xforms:')
disp(' Sqrt - square root transformation')
disp(' Log - log transformation')
disp(' Anscombe - square root transformation')
disp(' Wahba - log transformation of periodogram')
disp(' Pgram - periodogram')
disp(' Add Noise - apply the currently defined noise to the data & plot')
disp(' Normalize - apply the WaveLab routine ''NormNoise'' to the data and plot it.')
disp(st)
disp('Actions:')
disp(' Plot_WT - Plot Wavelet Transforms ')
disp(' Plot_MRA - Plot Multi-Resolution Analysis ')
disp(' Plot_DCT - Plot Discrete Cosine Transforms ')
disp(' WPTour - Wavelet Packet & Best Basis Analysis ')
disp(' CPTour - Cosine Packets & Best Basis Analysis ')
disp(' DeNoise - carry out the denoising of the data; display results')
disp(st)
disp('Params:')
disp(' Wavelet - Select the wavelet for the wavelet transform')
disp(' Bell - Select the bell to be used in cosine packets')
disp(' Nonlinearity - type of thresholding to use in denoising')
disp(' Threshold Selector - method of selecting the threshold')
disp(' Noise Type - type of noise to use when adding noise')
disp(' Noise Level - amplitude of noise when adding noise')
disp(' Signal Length - signal length when fabricating artificial signal')
disp(st)
disp('KEEP THIS TEXT WINDOW HANDY AND YOU WILL SEE COMMENTS')
disp('AND THE MATLAB COMMANDS DISPLAYED AS THEY ARE EXECUTING,')
disp('FROM TIME TIME TO TIME YOU WILL HAVE TO ENTER DATA HERE.')
disp(st)
clear;close;close;close
do_global
back_color = [ 0 , 0, 0 ];
echo off
num_menus = 5;
menu_names = [ ...
'Data___'; ...
'Signals'; ...
'Xforms_'; ...
'Actions'; ...
'Params_'; ...
];
% To add menu items, increase the appropriate number in the array
% below, and add the corresponding 'entries' and 'call backs':
num_menu_items = [ 8 15 6 10 0];
% -- Data for Data menu # 1 --- %
Data____entries = [ ...
'Caruso ' ; ...
'Laser ' ; ...
'Sunspots ' ; ...
'Seismic ' ; ...
'ESCA ' ; ...
'HochNMR ' ; ...
'RaphaelNMR ' ; ...
'User Defined' ; ...
];
% dummy = [ 'def_data( 1 );' ; ...
Data____callbacks = [ ...
'def_data( 0 );' ; ...
'def_data( 1 );' ; ...
'def_data( 2 );' ; ...
'def_data( 3 );' ; ...
'def_data( 4 );' ; ...
'def_data( 5 );' ; ...
'def_data( 6 );' ; ...
'def_data( 7 );' ; ...
];
% -- Data for Signals menu #2 --- %
Signals_entries = [ ...
'HeaviSine ' ; ...
'Bumps ' ; ...
'Blocks ' ; ...
'Doppler ' ; ...
'Ramp ' ; ...
'Cusp ' ; ...
'Sing ' ; ...
'HiSine ' ; ...
'LoSine ' ; ...
'LinChirp ' ; ...
'TwoChirp ' ; ...
'QuadChirp ' ; ...
'MishMash ' ; ...
'WernerSorrows ' ; ...
'Leopold ' ; ...
];
Signals_callbacks = [ ...
'def_signal( 1);' ; ...
'def_signal( 2);' ; ...
'def_signal( 3);' ; ...
'def_signal( 4);' ; ...
'def_signal( 5);' ; ...
'def_signal( 6);' ; ...
'def_signal( 7);' ; ...
'def_signal( 8);' ; ...
'def_signal( 9);' ; ...
'def_signal(10);' ; ...
'def_signal(11);' ; ...
'def_signal(12);' ; ...
'def_signal(13);' ; ...
'def_signal(14);' ; ...
'def_signal(15);' ; ...
];
% -- Data for Xforms menu #3 --- %
Xforms__entries = [ ...
'Sqrt ' ; ...
'Log ' ; ...
'Anscombe ' ; ...
'Wahba ' ; ...
'Add Noise' ; ...
'Normalize' ; ...
];
Xforms__callbacks = [ ...
'do_transform(''sqrt '')'; ...
'do_transform(''log '')'; ...
'do_transform(''Frank'')'; ...
'do_transform(''Grace'')'; ...
'do_transform(''noise'')'; ...
'do_transform(''scale'')'; ...
];
%% -- Data for Actions menu #4 --- %
Actions_entries = [ ...
'Plot_WT ' ; ...
'Plot_MRA ' ; ...
'Plot_DCT '; ...
'WPTour '; ...
'CPTour '; ...
'WT Compress'; ...
'WT DeNoise ' ; ...
'WP Compress'; ...
'CP Compress'; ...
'Quit ' ; ...
];
Actions_callbacks = [ ...
'do_action(1) '; ...
'do_action(2) '; ...
'do_action(3) '; ...
'do_action(4) '; ...
'do_action(5) '; ...
'do_action(6) '; ...
'do_action(7) '; ...
'do_action(8) '; ...
'do_action(9) '; ...
'do_action(10)';
];
% -- Data for Params menu #5 --- %
Params__entries = [ ...
'Wavelets ' ; ...
'Bell ' ; ...
'Nonlinearity ' ; ...
'Threshold ' ; ...
'Noise Type ' ; ...
'Noise Level ' ; ...
'Signal Length'; ...
];
Params__callbacks = [ ...
'define_ ( 1 );'; ...
'define_ ( 2 );'; ...
'define_ ( 3 );'; ...
'define_ ( 4 );'; ...
'define_(5); ';
'define_(6); ';
'define_(7); ';
];
disp('%*******************************')
disp('% === Set Up The Menus === *')
disp('%*******************************')
for ii = 1:num_menus
menu_name = menu_names( ii, : );
menu_tag = menu_name;
menu_tags( ii, : ) = [ '*' menu_tag ];
while menu_tag(length(menu_tag)) == '_'
menu_tag(length(menu_tag)) = [];
end
menu_id = uimenu('Label', [ '*' menu_tag ' ' ] );
menu_ids( ii ) = menu_id;
if num_menu_items(ii) > 0,
for kk = 1:num_menu_items( ii )
st = [ 'menu_label = ' menu_name '_entries( kk, : );' ];
eval( st );
st = [ 'callback = ' menu_name '_callbacks( kk, : );' ];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -