vfb.m

来自「很好用的程序」· M 代码 · 共 45 行

M
45
字号
clear all;

R=20*60;         %the update period
H=10;            %the water depth
Et=32.4;
d=1000;

for M=1:500
    
    for i=1:M
        if M<50
            f=i;
        else
            f=(50/M)*i;
        end
        if f<7
            alpha=0.0601*f^0.8552 ;
        elseif f<21
            alpha=9.7888*f^1.7885*10^(-3);
        elseif f<35
            alpha=0.3026*f-3.7933;
        else alpha=0.504*f-11.2;
        end
        TL=10*log10(d)+alpha*d*10^(-3);
        SL=TL+85;
        It=10^(SL/10)*0.67*10^(-18);
        Pt=2*pi*H*It;
        Pframe(i)=1.23*Pt*(M-i+1)*(1+1/5+1/5+1/25);
       
        
    end
    pmax=max(Pframe);
    
    Tactive=Et/pmax;
        
    Ttotal=1.23*(M+M/5);
        
    Tlifetime(M)=Tactive/Ttotal*R/24;
  
end

M=1:500;
hold on;
semilogy(M,Tlifetime);
ylim([1,10^8])

⌨️ 快捷键说明

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