📄 plnaby.m
字号:
function plnaby (eph,tsat,naby,maxnaby);%PLNUMSAT: Plot BNR's%% The function creates a plot showing the signal to noise ratio of% observations as a function of time.%% Input arguments:% tsat - Time (seconds)% naby - BNR (signal to noise ratio of observations)%% Output arguments:% none% ----------------------------------------------------------------------% File.....: plnaby.m% Date.....: 13-MAR-2000% Version..: 1.0% Author...: Peter Joosten% Mathematical Geodesy and Positioning% Delft University of Technology% ----------------------------------------------------------------------% --------------------------------------% --- Create the figure, set options ---% --------------------------------------h = figure('Units','normalized', ... 'Position',[0.2 0.5 0.6 0.3], ... 'Color',[0 0 0], ... 'Name','BNR-values vs. time', ... 'NumberTitle','off');h = axes ('Units','normalized', ... 'Position',[0.05 0.10 0.90 0.80], ... 'Color',[0 0 0], ... 'XColor',[1 1 1], ... 'YColor',[1 1 1], ... 'Xgrid','on', ... 'Ygrid','on', ... 'Box','on');hold on;% -----------------------------------------% --- Limits, grid, labels and such ... ---% -----------------------------------------xlabel ('Time [sec]');ylabel ('BNR-values');ymin = 0.9*min(min(naby))ymax = 1.1*max(max(naby))if nargin >= 4; ymax = maxnaby; end;set (gca,'Xlim',[min(tsat) max(tsat)]);set (gca,'Ylim',[ymin ymax]);% -------------------% --- Actual plot ---% -------------------lcol = get(gca,'ColorOrder');for i = 1:size(eph,1); idx1 = find(~isnan(naby(i,:))); if ~isempty(idx1); idx2 = [0 (find (idx1(1:length(idx1)-1) ~= idx1(2:length(idx1))-1)) length(idx1)]; for j = 1:length(idx2)-1 h = plot (tsat(idx1(idx2(j)+1):idx1(idx2(j+1))), ... naby(i,idx1(idx2(j)+1):idx1(idx2(j+1)))); set (h,'LineStyle','-'); set (h,'LineWidth',2); set (h,'Color',lcol(mod(i,size(lcol,1))+1,:)); tx = tsat(idx1(round(mean([idx2(j) idx2(j+1)])))); ty = naby(i,idx1(round(mean([idx2(j) idx2(j+1)]))))+0.025*(ymax-ymin); h = text(tx,ty,num2str(eph(i,1))); set (h,'Color',lcol(mod(i,size(lcol,1))+1,:)); end; endend;% ----------------------% --- End of routine ---% ----------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -