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

📄 plotreflncoefft.m

📁 水声模型 很不错的东西
💻 M
字号:
function NewDir = PlotReflnCoefft(DfltDir)

Here = pwd;
NewDir = Here;
if nargin >= 1
   DirStat = 1;
   if ~exist(DfltDir, 'dir')
       DirStat = LibMakeDirectory(DfltDir);
   end
   if DirStat
       cd(DfltDir);
       NewDir = DfltDir;
   end
end
[File, Path] = uigetfile('*.brc', 'Reflection coefft file');
cd(Here);

if File ~= 0
    NewDir = Path;
    InFile = fopen([Path File], 'rt');
    NPt = fscanf(InFile, '%f', 1);
    InDat = fscanf(InFile, '%f', [3, NPt]);
    
    Theta = InDat(1, :);
    Mag = InDat(2, :);
    Phase = InDat(3, :);
    
    Ans = inputdlg({...
   		      'Figure number', ...
      		   'Hold current plot (y/n)', ...
         	   'Line style'}, '', 1, {int2str(gcf), 'n', 'b-'});
       
	if ~isempty(Ans)  
   		FigNum = str2num(Ans{1});
   		HoldCurrent = strcmpi(Ans{2}, 'y');
	   	Style = Ans{3};
        
        figure(FigNum);
        if ~HoldCurrent
            clf;
            if exist('GUI_SetupGraphMenu.m', 'file')
                GUI_SetupGraphMenu('plot');
            end
        end
        subplot(2,1,1);
        hold on;
        plot(Theta, Mag, Style);
        ylabel('Magnitude');
        title(['Bottom reflection coefficient - ' File], 'Interpreter', 'none');
    
        subplot(2,1,2);
        hold on;
        plot(Theta, Phase, Style);
        ylabel('Phase (deg)');
        xlabel('Grazing angle (deg)');
    end
    fclose(InFile);
end

⌨️ 快捷键说明

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