📄 dplresolution.m
字号:
else
A_TEA=diff(V_TEA)/Horizon_Interval_partly;
A_TEA=filtfilt(FilterTEA,1,A_TEA);
A_TEA(size_x,1)=A_TEA((size_x-1),1);
end
elseif DPRCover_PopMenuTEA_Value==3
A_TEA=V_TEA;
end
end
if DPRCover_PopMenuTEB_Value~=4
if DPRCover_PopMenuTEB_Value==1 | DPRCover_PopMenuTEB_Value==2
if get(findobj('Tag','radiobutton19'),'Value')==1
A_TEB=diff(V_TEB)/Horizon_Interval_partly;
A_TEB=filtfilt(FilterSTD10T,1,A_TEB);
A_TEB(size_x,1)=A_TEB((size_x-1),1);
else
A_TEB=diff(V_TEB)/Horizon_Interval_partly;
A_TEB=filtfilt(FilterTEB,1,A_TEB);
A_TEB(size_x,1)=A_TEB((size_x-1),1);
end
elseif DPRCover_PopMenuTEB_Value==3
A_TEB=V_TEB;
end
end
[size_x,size_y]=size(A_STD);
x=1:size_x;
plot(x,A_STD,'r')
set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
grid on;zoom off;zoom xon;
hold on;
if DPRCover_PopMenuTEA_Value~=4
plot(x,A_TEA,'c')
set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
grid on;zoom off;zoom xon;
hold on;
end
if DPRCover_PopMenuTEB_Value~=4
plot(x,A_TEB,'y')
set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
grid on;zoom off;zoom xon;
end
hold off;
title('操作提示:选择加速度波形的零线起点和终点','FontSize',10)
[x,y]=ginput;
x_base1=round(x);
size_xbase1=size(x_base1);
x_base1=x_base1(size_xbase1(1,1));
set(findobj('Tag','edit27'),'String',num2str(x_base1));
[x,y]=ginput;
title('')
x_base2=round(x);
size_xbase2=size(x_base2);
x_base2=x_base2(size_xbase1(1,1));
set(findobj('Tag','edit28'),'String',num2str(x_base2));
title('操作提示:选择加速度波形的结尾点,单击回车取消选择','FontSize',10)
[x,y]=ginput;
x_base3=round(x);
hold off;
title('');
if isempty(x_base3)
else
size_xbase3=size(x_base3);
x_base3=x_base3(size_xbase3(1,1));
A_STD=A_STD(1:x_base3,1);
if DPRCover_PopMenuTEA_Value~=4
A_TEA=A_TEA(1:x_base3,1);
end
if DPRCover_PopMenuTEB_Value~=4
A_TEB=A_TEB(1:x_base3,1);
end
end
[size_x,size_y]=size(A_STD);
A_STD=A_STD-mean(A_STD([x_base1:x_base2],1));
save DPR_DataSupport A_STD -append;
if DPRCover_PopMenuTEA_Value~=4
A_TEA=A_TEA-mean(A_TEA([x_base1:x_base2],1));
save DPR_DataSupport A_TEA -append;
end
if DPRCover_PopMenuTEB_Value~=4
A_TEB=A_TEB-mean(A_TEB([x_base1:x_base2],1));
save DPR_DataSupport A_TEB -append;
end
A_STD_max=max(A_STD)/9.80665;
save DPR_DataSupport A_STD_max -append;
if DPRCover_PopMenuTEA_Value~=4
if DPRCover_PopMenuTEA_Value==1 | DPRCover_PopMenuTEA_Value==2
A_TEA_max=max(A_TEA)/9.80665;
elseif DPRCover_PopMenuTEA_Value==3
A_TEA_max=max(A_TEA).*1000;
end
save DPR_DataSupport A_TEA_max -append;
end
if DPRCover_PopMenuTEB_Value~=4
if DPRCover_PopMenuTEB_Value==1 | DPRCover_PopMenuTEB_Value==2
A_TEB_max=max(A_TEB)/9.80665;
elseif DPRCover_PopMenuTEB_Value==3
A_TEB_max=max(A_TEB).*1000;
end
save DPR_DataSupport A_TEB_max -append;
end
if DPRCover_PopMenuSTD_Value==1
if DPRCover_PopMenuTEA_Value~=4
if DPRCover_PopMenuTEA_Value==1
Sens_TEA_A=A_TEA_max/A_STD_max;
elseif DPRCover_PopMenuTEA_Value==2
Sens_TEA_A=A_STD_max/A_TEA_max;
elseif DPRCover_PopMenuTEA_Value==3
Sens_TEA_A=A_TEA_max/A_STD_max;
end
save DPR_DataSupport Sens_TEA_A -append;
end
if DPRCover_PopMenuTEB_Value~=4
if DPRCover_PopMenuTEB_Value==1
Sens_TEB_A=A_TEB_max/A_STD_max;
elseif DPRCover_PopMenuTEB_Value==2
Sens_TEB_A=A_STD_max/A_TEB_max;
elseif DPRCover_PopMenuTEB_Value==3
Sens_TEB_A=A_TEB_max/A_STD_max;
end
save DPR_DataSupport Sens_TEB_A -append;
end
end
if DPRCover_PopMenuSTD_Value==2
if DPRCover_PopMenuTEA_Value~=4
if DPRCover_PopMenuTEA_Value==1
Sens_TEA_A=A_TEA_max/A_STD_max;
elseif DPRCover_PopMenuTEA_Value==2
Sens_TEA_A=A_STD_max/A_TEA_max;
elseif DPRCover_PopMenuTEA_Value==3
Sens_TEA_A=A_TEA_max/A_STD_max;
end
save DPR_DataSupport Sens_TEA_A -append;
end
if DPRCover_PopMenuTEB_Value~=4
if DPRCover_PopMenuTEB_Value==1
Sens_TEB_A=A_TEB_max/A_STD_max;
elseif DPRCover_PopMenuTEB_Value==2
Sens_TEB_A=A_STD_max/A_TEB_max;
elseif DPRCover_PopMenuTEB_Value==3
Sens_TEB_A=A_TEB_max/A_STD_max;
end
save DPR_DataSupport Sens_TEB_A -append;
end
end
if DPRCover_PopMenuSTD_Value==3
if DPRCover_PopMenuTEA_Value~=4
if DPRCover_PopMenuTEA_Value==1
Sens_TEA_A=A_TEA_max/A_STD_max;
elseif DPRCover_PopMenuTEA_Value==2
Sens_TEA_A=A_STD_max/A_TEA_max;
elseif DPRCover_PopMenuTEA_Value==3
Sens_TEA_A=A_TEA_max/A_STD_max;
end
save DPR_DataSupport Sens_TEA_A -append;
end
if DPRCover_PopMenuTEB_Value~=4
if DPRCover_PopMenuTEB_Value==1
Sens_TEB_A=A_TEB_max/A_STD_max;
elseif DPRCover_PopMenuTEB_Value==2
Sens_TEB_A=A_STD_max/A_TEB_max;
elseif DPRCover_PopMenuTEB_Value==3
Sens_TEB_A=A_TEB_max/A_STD_max;
end
save DPR_DataSupport Sens_TEB_A -append;
end
end
if DPRCover_PopMenuSTD_Value~=3
[flag_var,x_max]=max(A_STD);
pos_y=flag_var/10;
deffer1=abs(A_STD(1:x_max)-pos_y);
deffer2=abs(A_STD((x_max+1):size_x)-pos_y);
[flag_var,pos_x1]=min(deffer1);
[flag_var,pos_x2]=min(deffer2);
pos_x2=pos_x2+x_max;
T_STD_A=(pos_x2-pos_x1)*Horizon_Interval_partly*1e6;
else
T_STD_A=num2str('NaN');
end
save DPR_DataSupport T_STD_A -append;
run DPLResolutionResult;
% --- If Enable == 'on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over text3.
% --- Executes during object deletion, before destroying properties.
function text3_DeleteFcn(hObject, eventdata, handles)
% hObject handle to text3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes during object creation, after setting all properties.
function text3_CreateFcn(hObject, eventdata, handles)
% hObject handle to text3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes during object creation, after setting all properties.
function text7_CreateFcn(hObject, eventdata, handles)
% hObject handle to text7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
WeekValue=Weekday(Date);
switch WeekValue
case 1
WeekStr='日';
case 2
WeekStr='一';
case 3
WeekStr='二';
case 4
WeekStr='三';
case 5
WeekStr='四';
case 6
WeekStr='五';
case 7
WeekStr='六';
end
set(hObject,'String',['今天是',num2str(year(date)),'年',num2str(month(date)),'月',num2str(day(date)),'日 星期',WeekStr]);
function edit10_Callback(hObject, eventdata, handles)
% hObject handle to edit10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit10 as text
% str2double(get(hObject,'String')) returns contents of edit10 as a double
DPR_AmpSTD=get(hObject,'String');
DPR_AmpSTD=str2num(DPR_AmpSTD);
save DPR_DataSupport DPR_AmpSTD -append;
% --- Executes during object creation, after setting all properties.
function edit10_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
load DPR_DataSupport DPR_AmpSTD;
set(hObject,'String',num2str(DPR_AmpSTD));
function edit11_Callback(hObject, eventdata, handles)
% hObject handle to edit11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit11 as text
% str2double(get(hObject,'String')) returns contents of edit11 as a double
DPR_AmpTEA=get(hObject,'String');
DPR_AmpTEA=str2num(DPR_AmpTEA);
save DPR_DataSupport DPR_AmpTEA -append;
% --- Executes during object creation, after setting all properties.
function edit11_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
load DPR_DataSupport DPR_AmpTEA;
set(hObject,'String',num2str(DPR_AmpTEA));
function edit12_Callback(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit12 as text
% str2double(get(hObject,'String')) returns contents of edit12 as a double
DPR_AmpTEB=get(hObject,'String');
DPR_AmpTEB=str2num(DPR_AmpTEB);
save DPR_DataSupport DPR_AmpTEB -append;
% --- Executes during object creation, after setting all properties.
function edit12_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
load DPR_DataSupport DPR_AmpTEB;
set(hObject,'String',num2str(DPR_AmpTEB));
function edit13_Callback(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit13 as text
% str2double(get(hObject,'String')) returns contents of edit13 as a double
% --- Executes during object creation, after setting all properties.
function edit13_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit17_Callback(hObject, eventdata, handles)
% hObject handle to edit17 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit17 as text
% str2double(get(hObject,'String')) returns contents of edit17 as a double
% --- Executes during object creation, after setting all properties.
function edit17_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit17 (see GCBO)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -