⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w5_ed_ad.m

📁 这是一个用于语音信号处理的工具箱
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	w5_edit_adjust.m
%
%	jmw
%	6/20/94
%
%       User-Specified Maps:  Edit Window
%       Callback for "adjust" button.
%	reads ONE click of the mouse, quantizes position, and 
%	updates nearest target
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% get one data point from mouse

[x_pt, y_pt] = ginput(1);
	
% clean up and quantize x to nearest 10 interval
	
x_q = 10 * round(0.1 * x_pt);

if (x_q <= 0)
	x_q = 1;
elseif (x_q >= 100)
	x_q = 100;
end;

% clean up and quantize y to nearest 0.1 interval
	
y_q = 0.1 * round(10 * y_pt);
	
if (y_q < 0)
	y_q = 0;
elseif (y_q > 1)
	y_q = 1;
end;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% find the closest target and UPDATE Y VALUE !!!!!

[t_m,t_n]=size(target);

diff = abs(x_q - target(:,1));
[sortdiff,diffindex] = sort(diff);

target(diffindex(1),2) = y_q;

% call smoothing and display programs

TARGET_SMOOTH = 1;	% flag to request smoothing be done
w5_ed_sm;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear x_q y_q x_pt y_pt diff sortdiff diffindex t_m t_n

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -