base.m

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

M
40
字号
clear all

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

alpha=0.504*f-11.2;
        
TL=10*log10(d)+alpha*d*10^(-3);
        
SL=TL+85;
        
It=10^(SL/10)*0.67*10^(-18);
        
Pt=2*pi*H*It;
        
for M=1:500
   
    for i=1:M
        
        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;
semilogy(M,Tlifetime);
ylim([1,10^8])

⌨️ 快捷键说明

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