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

📄 source.m

📁 计算水声传播的时域波数积分程序
💻 M
字号:
function source( T, S, SD, Nsd, Ntout, omega, fmin, fmax, Pulse, PulseTitle, IniFlag )

% Evaluate the source time series

% stemp is a temporary workspace

% IniFlag, used to control filtering, has to be controlled on the outside
% since SPARC changes the filtering as a function of wavenumber.

MaxNt  = 1000000;
MaxNST = 1000000;

%SAVE TF, SF, Nt

% If first call, tabulate the time series

if ( IniFlag )
    if ( ~exist( SF, 'var' ) ) ALLOCATE( SF( Nsd, MaxNST / Nsd ) )
        if ( Pulse(1:1) == 'F' || Pulse(1:1) == 'B' ) THEN
            % From a file
            %CALL STSHDR( PulseTitle, SD, Nsd )
            %CALL SFILE( Pulse, PulseTitle, Nsd, TF, stempR, SF, Nt, MaxNt, MaxNST )
            deltat = TF( 2 ) - TF( 1 )
        else
            % Use one of the canned wavelets
            Nsd    = 1;
            deltat = 0.2 / omega;
            TSTART = -200.0 * deltat;
            Nt     = 1024;
            for it = 1 : Nt
                TF( it ) = TSTART + ( it - 1 ) * deltat;
                cans( TF( it ), omega, Pulse, SF, Nsd, it, PulseTitle )
            end
        end

        % Filter the time series
        %FILTER( Pulse, deltat, stemp, SF, Nsd, Nt, fmin, fmax )

        IniFlag = 0;
    end

    evalu( T, Pulse, TF, SF, Nsd, Nt, S, Ntout );
end

⌨️ 快捷键说明

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