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

📄 dplresolutionresult.m

📁 在MATLAB环境下设计一个加速度计动态校准的数据处理软件附有程序源代码,压缩包中有软件使用说明
💻 M
📖 第 1 页 / 共 4 页
字号:
end
set(findobj('Tag','text32'),'String',DateStr);
set(findobj('Tag','text35'),'String',TimeStr);
set(findobj('Tag','text37'),'String',[num2str(1/Horizon_Interval),'Hz']);
set(findobj('Tag','text39'),'String',[num2str(countSTD),'dot']);
set(findobj('Tag','text141'),'String',[num2str(Horizon_Time),'s']);
if DPRResult_RadioV_Value==1
    load DPR_DataSupport V_STD V_TEA V_TEB;
    [size_x,size_y]=size(V_STD);
    x=1:size_x;
    if DPRCover_PopMenuSTD_Value==1 
        plot(x,V_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==1
            plot(x,V_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;   
        elseif DPRCover_PopMenuTEA_Value==2
            plot(x,V_TEA.*Sens_TEA_V,'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;    
        elseif DPRCover_PopMenuTEA_Value==3
            plot(x,(V_TEA.*1000)./Sens_TEA_V,'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==1
            plot(x,V_TEB,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        elseif DPRCover_PopMenuTEB_Value==2
            plot(x,V_TEB.*Sens_TEB_V,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        elseif DPRCover_PopMenuTEB_Value==3
            plot(x,(V_TEB.*1000)./Sens_TEB_V,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        end
    elseif DPRCover_PopMenuSTD_Value==2
        plot(x,V_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==1
            plot(x,V_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;     
        elseif DPRCover_PopMenuTEA_Value==2
            plot(x,V_TEA.*Sens_TEA_V,'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;   
        elseif DPRCover_PopMenuTEA_Value==3
            plot(x,(V_TEA.*1000)./Sens_TEA_V,'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==1
            plot(x,V_TEB,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        elseif DPRCover_PopMenuTEB_Value==2
            plot(x,V_TEB.*Sens_TEB_V,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        elseif DPRCover_PopMenuTEB_Value==3
            plot(x,(V_TEB.*1000)./Sens_TEB_V,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        end
    end
    hold off;
elseif DPRResult_RadioV_Value==0
    load DPR_DataSupport A_STD A_TEA A_TEB;
    [size_x,size_y]=size(A_STD);
    x=1:size_x;
    if DPRCover_PopMenuSTD_Value==1 
        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==1
            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;
        elseif DPRCover_PopMenuTEA_Value==2
            plot(x,A_TEA.*Sens_TEA_A,'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;
        elseif DPRCover_PopMenuTEA_Value==3
            plot(x,(A_TEA.*(1000*9.80665))./Sens_TEA_A,'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==1
            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;
        elseif DPRCover_PopMenuTEB_Value==2
            plot(x,A_TEB.*Sens_TEB_A,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        elseif DPRCover_PopMenuTEB_Value==3
            plot(x,(A_TEB.*(1000*9.80665))./Sens_TEB_A,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        end
    elseif DPRCover_PopMenuSTD_Value==2
        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==1
            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;
        elseif DPRCover_PopMenuTEA_Value==2
            plot(x,A_TEA.*Sens_TEA_A,'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;
        elseif DPRCover_PopMenuTEA_Value==3
            plot(x,(A_TEA.*(1000*9.80665))./Sens_TEA_A,'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==1
            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; 
        elseif DPRCover_PopMenuTEB_Value==2
            plot(x,A_TEB.*Sens_TEB_A,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        elseif DPRCover_PopMenuTEB_Value==3
            plot(x,(A_TEB.*(1000*9.80665))./Sens_TEB_A,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon; 
        end
    elseif DPRCover_PopMenuSTD_Value==3
        plot(x,A_STD.*9.80665,'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==1
            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;
        elseif DPRCover_PopMenuTEA_Value==2
            plot(x,A_TEA.*Sens_TEA_A,'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;
        elseif DPRCover_PopMenuTEA_Value==3
            plot(x,(A_TEA.*(1000*9.80665))./Sens_TEA_A,'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==1
            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;
        elseif DPRCover_PopMenuTEB_Value==2
            plot(x,A_TEB.*Sens_TEB_A,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        elseif DPRCover_PopMenuTEB_Value==3
            plot(x,(A_TEB.*(1000*9.80665))./Sens_TEB_A,'y')
            set(gca,'Color',[0,0,0],'XColor',[0,1/2,0],'YColor',[0,1/2,0]);
            grid on;zoom off;zoom xon;
        end
    end
    hold off;
end


% Choose default command line output for DPLResolutionResult
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes DPLResolutionResult wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = DPLResolutionResult_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
DPRResult_RadioV_Value=get(findobj('Tag','radiobutton1'),'Value');
DPRResult_RadioA_Value=get(findobj('Tag','radiobutton2'),'Value');
load DPR_DataSupport DPRCover_PopMenuTEA_Value DPRCover_PopMenuTEB_Value;
load DPR_DataSupport path Horizon_Interval countSTD;
if DPRResult_RadioV_Value==1
   load DPR_DataSupport FileSTD_Name DPR_FilterSTD DPR_FilterSTD10T;
   load DPR_DataSupport V_STD V_STD_max;
   fid=fopen([path,'ResultV_',FileSTD_Name],'wt');
   fprintf(fid,'%s\n',['This is the Velocity result of the data file(',FileSTD_Name,').']);
   fprintf(fid,' %s\n',['XINCR ',num2str(Horizon_Interval),'s']);
   fprintf(fid,' %s\n',['POINT ',num2str(countSTD)]);
   fprintf(fid,' %s\n',['V_Peak ',num2str(V_STD_max),'m/s']);
   if get(findobj('Tag','radiobutton19'),'Value')==1
      fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterSTD10T),'kHz']);
   else
      fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterSTD),'kHz']);
   end
   fprintf(fid,' %s\n',['Data Array:']);
   fprintf(fid,' %10.3f\n',V_STD(:,1));
   if DPRCover_PopMenuTEA_Value~=4
      load DPR_DataSupport FileTEA_Name DPR_FilterTEA DPR_FilterSTD10T;
      load DPR_DataSupport V_TEA V_TEA_max;
      fid=fopen([path,'ResultV_',FileTEA_Name],'wt');
      fprintf(fid,'%s\n',['This is the Velocity result of the data file(',FileTEA_Name,').']);
      fprintf(fid,' %s\n',['XINCR ',num2str(Horizon_Interval),'s']);
      fprintf(fid,' %s\n',['POINT ',num2str(countSTD)]);
      fprintf(fid,' %s\n',['V_Peak ',num2str(V_TEA_max),'m/s']);
      if get(findobj('Tag','radiobutton19'),'Value')==1
         fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterSTD10T),'kHz']);
      else
         fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterTEA),'kHz']);
      end
      fprintf(fid,' %s\n',['Data Array:']);
      fprintf(fid,' %10.3f\n',V_TEA(:,1));
   end
   if DPRCover_PopMenuTEB_Value~=4
      load DPR_DataSupport FileTEB_Name DPR_FilterTEB DPR_FilterSTD10T;
      load DPR_DataSupport V_TEB V_TEB_max;
      fid=fopen([path,'ResultV_',FileTEB_Name],'wt');
      fprintf(fid,'%s\n',['This is the Velocity result of the data file(',FileTEB_Name,').']);
      fprintf(fid,' %s\n',['XINCR ',num2str(Horizon_Interval),'s']);
      fprintf(fid,' %s\n',['POINT ',num2str(countSTD)]);
      fprintf(fid,' %s\n',['V_Peak ',num2str(V_TEB_max),'m/s']);
      if get(findobj('Tag','radiobutton19'),'Value')==1
         fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterSTD10T),'kHz']);
      else
         fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterTEB),'kHz']);
      end
      fprintf(fid,' %s\n',['Data Array:']);
      fprintf(fid,' %10.3f\n',V_TEB(:,1));
   end
end
if DPRResult_RadioA_Value==1
   load DPR_DataSupport FileSTD_Name DPR_FilterSTD DPR_FilterSTD10T;
   load DPR_DataSupport A_STD A_STD_max;
   fid=fopen([path,'ResultA_',FileSTD_Name],'wt');
   fprintf(fid,'%s\n',['This is the Acceleration result of the data file(',FileSTD_Name,').']);
   fprintf(fid,' %s\n',['XINCR ',num2str(Horizon_Interval),'s']);
   fprintf(fid,' %s\n',['POINT ',num2str(countSTD)]);
   fprintf(fid,' %s\n',['A_Peak ',num2str(A_STD_max),'g']);
   if get(findobj('Tag','radiobutton19'),'Value')==1
      fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterSTD10T),'kHz']);
   else
      fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterSTD),'kHz']);
   end
   fprintf(fid,' %s\n',['Data Array:']);
   fprintf(fid,' %10.3f\n',A_STD(:,1));
   if DPRCover_PopMenuTEA_Value~=4
       load DPR_DataSupport FileTEA_Name DPR_FilterTEA DPR_FilterSTD10T;
       load DPR_DataSupport A_TEA A_TEA_max;
       fid=fopen([path,'ResultA_',FileTEA_Name],'wt');
       fprintf(fid,'%s\n',['This is the Acceleration result of the data file(',FileTEA_Name,').']);
       fprintf(fid,' %s\n',['XINCR ',num2str(Horizon_Interval),'s']);
       fprintf(fid,' %s\n',['POINT ',num2str(countSTD)]);
       fprintf(fid,' %s\n',['A_Peak ',num2str(A_TEA_max),'g']);
       if get(findobj('Tag','radiobutton19'),'Value')==1
          fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterSTD10T),'kHz']);
       else
          fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterTEA),'kHz']);
       end
       fprintf(fid,' %s\n',['Data Array:']);
       fprintf(fid,' %10.3f\n',A_TEA(:,1));
   end
   if DPRCover_PopMenuTEB_Value~=4
       load DPR_DataSupport FileTEB_Name DPR_FilterTEB DPR_FilterSTD10T;
       load DPR_DataSupport A_TEB A_TEB_max;
       fid=fopen([path,'ResultA_',FileTEB_Name],'wt');
       fprintf(fid,'%s\n',['This is the Acceleration result of the data file(',FileTEB_Name,').']);
       fprintf(fid,' %s\n',['XINCR ',num2str(Horizon_Interval),'s']);
       fprintf(fid,' %s\n',['POINT ',num2str(countSTD)]);
       fprintf(fid,' %s\n',['A_Peak ',num2str(A_TEB_max),'g']);
       if get(findobj('Tag','radiobutton19'),'Value')==1
          fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterSTD10T),'kHz']);
       else
          fprintf(fid,' %s\n',['LOW-PASS FREQUENCY ',num2str(DPR_FilterTEB),'kHz']);
       end
       fprintf(fid,' %s\n',['Data Array:']);
       fprintf(fid,' %10.3f\n',A_TEB(:,1));
   end
end

function edit1_Callback(hObject, eventdata, handles)
% hObject    handle to edit1 (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 edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double

⌨️ 快捷键说明

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