📄 dplresolution.m
字号:
% 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 edit18_Callback(hObject, eventdata, handles)
% hObject handle to edit18 (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 edit18 as text
% str2double(get(hObject,'String')) returns contents of edit18 as a double
% --- Executes during object creation, after setting all properties.
function edit18_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit18 (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 edit19_Callback(hObject, eventdata, handles)
% hObject handle to edit19 (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 edit19 as text
% str2double(get(hObject,'String')) returns contents of edit19 as a double
% --- Executes during object creation, after setting all properties.
function edit19_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit19 (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 edit24_Callback(hObject, eventdata, handles)
% hObject handle to edit24 (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 edit24 as text
% str2double(get(hObject,'String')) returns contents of edit24 as a double
% --- Executes during object creation, after setting all properties.
function edit24_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit24 (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 edit25_Callback(hObject, eventdata, handles)
% hObject handle to edit25 (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 edit25 as text
% str2double(get(hObject,'String')) returns contents of edit25 as a double
% --- Executes during object creation, after setting all properties.
function edit25_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit25 (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 edit26_Callback(hObject, eventdata, handles)
% hObject handle to edit26 (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 edit26 as text
% str2double(get(hObject,'String')) returns contents of edit26 as a double
% --- Executes during object creation, after setting all properties.
function edit26_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit26 (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 edit27_Callback(hObject, eventdata, handles)
% hObject handle to edit27 (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 edit27 as text
% str2double(get(hObject,'String')) returns contents of edit27 as a double
% --- Executes during object creation, after setting all properties.
function edit27_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit27 (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 edit28_Callback(hObject, eventdata, handles)
% hObject handle to edit28 (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 edit28 as text
% str2double(get(hObject,'String')) returns contents of edit28 as a double
% --- Executes during object creation, after setting all properties.
function edit28_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit28 (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
% --- Executes on button press in pushbutton16.
function pushbutton16_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton16 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
load DPR_DataSupport DPRCover_PopMenuCOL_Value
if DPRCover_PopMenuCOL_Value==1
load DPR_DataSupport path;
name='*.wfm';
filename=[path,name];
[FileSTD_Name,path]=uigetfile(filename,'打开标准器具数据文件');
filename=[path,FileSTD_Name];
status=copyfile(filename,'FileSTD.wfm');
!cnvrtwfm -r -8 FileSTD.wfm
[fid,message]=fopen('FileSTD.wav','rb');
[DPR_DataSTD,countSTD]=fread(fid,inf,'int8');
status=fclose(fid);
save DPR_DataSupport FileSTD_Name path countSTD -append;
set(hObject,'String',FileSTD_Name);
!cnvrtwfm -p -d- -b- FileSTD.wfm
[fid,message]=fopen('FileSTD.asc','rt');
Inf=fread(fid,inf,'char')';
InfStr=char(Inf);
FidPos=findstr(InfStr,'XINCR');
status=fseek(fid,FidPos+4,-1);
FlagStr=fread(fid,6,'char')';
Horizon_Interval=sscanf(char(FlagStr),'%f');
Filter_Freq=0.09/(Horizon_Interval*100*2)/1000;
FidPos=findstr(InfStr,'YMULT');
status=fseek(fid,FidPos+4,-1);
FlagStr=fread(fid,7,'char')';
Vertical_Factor_STD=sscanf(char(FlagStr),'%f');
Horizon_Time=Horizon_Interval*countSTD;
FidPos=findstr(InfStr,'WFID');
status=fseek(fid,FidPos+10,-1);
FlagStr=fread(fid,26,'char')';
CHSTD_Status=sscanf(char(FlagStr),'%c');
save DPR_DataSupport Horizon_Interval Horizon_Time CHSTD_Status -append;
status=fclose(fid);
set(findobj('Tag','text70'),'String',path(1:20),'FontSize',9);
set(findobj('Tag','text16'),'String',[num2str(1/Horizon_Interval),'Hz']);
set(findobj('Tag','text40'),'String',[num2str(countSTD),'dot']);
set(findobj('Tag','text41'),'String',[num2str(Horizon_Time),'s']);
set(findobj('Tag','text42'),'String',CHSTD_Status);
set(findobj('Tag','edit24'),'String',num2str(countSTD));
set(findobj('Tag','edit30'),'String',num2str(Filter_Freq));
set(findobj('Tag','edit17'),'String',num2str(Filter_Freq));
set(findobj('Tag','edit18'),'String',num2str(Filter_Freq));
x=1:countSTD;
plot(x,DPR_DataSTD,'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;
load DPR_DataSupport DPRCover_PopMenuTEA_Value DPRCover_PopMenuTEB_Value CHTEA_Status CHTEB_Status;
if DPRCover_PopMenuTEA_Value==4 & DPRCover_PopMenuTEB_Value~=4
if any(CHTEB_Status)
set(findobj('Tag','pushbutton9'),'Enable','on');
end
elseif DPRCover_PopMenuTEA_Value~=4 & DPRCover_PopMenuTEB_Value==4
if any(CHTEA_Status)
set(findobj('Tag','pushbutton9'),'Enable','on');
end
elseif DPRCover_PopMenuTEA_Value~=4 & DPRCover_PopMenuTEB_Value~=4
if any(CHTEA_Status) & any(CHTEB_Status)
set(findobj('Tag','pushbutton9'),'Enable','on');
end
elseif DPRCover_PopMenuTEA_Value==4 & DPRCover_PopMenuTEB_Value==4
set(findobj('Tag','pushbutton9'),'Enable','on');
end
handles.countSTD=countSTD;
handles.DPR_DataSTD_Backup=DPR_DataSTD;
handles.DPR_DataSTD=DPR_DataSTD;
handles.Horizon_Interval=Horizon_Interval;
handles.Vertical_Factor_STD=Vertical_Factor_STD;
handles.output = hObject;
guidata(hObject, handles);
elseif DPRCover_PopMenuCOL_Value==2
load DPR_DataSupport path;
name='*.wfm';
filename=[path,name];
[FileSTD_Name,path]=uigetfile(filename,'打开标准器具数据文件');
filename=[path,FileSTD_Name];
status=copyfile(filename,'FileSTD.wfm');
!ConvertTekWfm FileSTD.wfm /TXT
[fid,message]=fopen('FileSTD.txt','r');
q1=fscanf(fid,'%c',1000);
TX1=findstr(q1,'Interval');
status=fseek(fid,TX1+9,'bof');
Horizon_Interval=fscanf(fid,'%c',15);
Horizon_Interval=sscanf(char(Horizon_Interval),'%f');
Filter_Freq=0.09/(Horizon_Interval*100*2)/1000;
Vertical_Factor_STD=1;
CHSTD_Status='NA';
save DPR_DataSupport Horizon_Interval CHSTD_Status -append;
status=fclose(fid);
!ConvertTekWfm FileSTD.wfm /MLAB
[fid,message]=fopen('FileSTD.dat','r');
[DPR_DataSTD,countSTD]=fscanf(fid,'%f',inf);
Horizon_Time=Horizon_Interval*countSTD;
status=fclose(fid);
save DPR_DataSupport Horizon_Time -append;
save DPR_DataSupport FileSTD_Name path countSTD -append;
set(hObject,'String',FileSTD_Name);
set(findobj('Tag','text16'),'String',[num2str(1/Horizon_Interval),'Hz']);
set(findobj('Tag','text40'),'String',[num2str(countSTD),'dot']);
set(findobj('Tag','text41'),'String',[num2str(Horizon_Time),'s']);
set(findobj('Tag','text42'),'String',CHSTD_Status);
set(findobj('Tag','edit24'),'String',num2str(countSTD));
set(findobj('Tag','edit30'),'String',num2str(Filter_Freq));
set(findobj('Tag','edit17'),'String',num2str(Filter_Freq));
set(findobj('Tag','edit18'),'String',num2str(Filter_Freq));
x=1:countSTD;
plot(x,DPR_DataSTD,'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;
load DPR_DataSupport DPRCover_PopMenuTEA_Value DPRCover_PopMenuTEB_Value CHTEA_Status CHTEB_Status;
if DPRCover_PopMenuTEA_Value==4 & DPRCover_PopMenuTEB_Value~=4
if any(CHTEB_Status)
set(findobj('Tag','pushbutton9'),'Enable','on');
end
elseif DPRCover_PopMenuTEA_Value~=4 & DPRCover_PopMenuTEB_Value==4
if any(CHTEA_Status)
set(findobj('Tag','pushbutton9'),'Enable','on');
end
elseif DPRCover_PopMenuTEA_Value~=4 & DPRCover_PopMenuTEB_Value~=4
if any(CHTEA_Status) & any(CHTEB_Status)
set(findobj('Tag','pushbutton9'),'Enable','on');
end
elseif DPRCover_PopMenuTEA_Value==4 & DPRCover_PopMenuTEB_Value==4
set(findobj('Tag','pushbutton9'),'Enable','on');
end
handles.countSTD=countSTD;
handles.DPR_DataSTD_Backup=DPR_DataSTD;
handles.DPR_DataSTD=DPR_DataSTD;
handles.Horizon_Interval=Horizon_Interval;
handles.Vertical_Factor_STD=Vertical_Factor_STD;
handles.output = hObject;
guidata(hObject, handles);
elseif DPRCover_PopMenuCOL_Value==3
load DPR_DataSupport path;
name='*.txt';
filename=[path,name];
[FileSTD_Name,path]=uigetfile(filename,'打开标准器具数据文件');
filename=[path,FileSTD_Name];
[fid,message]=fopen(filename,'rt');
flag1=fscanf(fid,'%c',625);
flagTX1=findstr(flag1,'XInc:');
status=fseek(fid,flagTX1+20,'bof');
Horizon_Interval=fscanf(fid,'%c',22);
Horizon_Interval=sscanf(char(Horizon_Interval),'%f');
flagTX2=findstr(flag1,'Data:')
status=fseek(fid,flagTX2+25,'bof');
[DPR_DataSTD,countSTD]=fscanf(fid,'%f',inf);
status=fclose(fid);
save DPR_DataSupport FileSTD_Name path countSTD -append;
set(hObject,'String',FileSTD_Name);
Filter_Freq=0.09/(Horizon_Interval*100*2)/1000;
Vertical_Factor_STD=1;
Horizon_Time=Horizon_Interval*countSTD;
CHSTD_Status='NA';
save DPR_DataSupport Horizon_Interval Horizon_Time CHSTD_Status -append;
set(findobj('Tag','text16'),'String',[num2str(1/Horizon_Interval),'Hz']);
set(findobj('Tag','text40'),'String',[num2str(countSTD),'dot']);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -