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

📄 beam.m

📁 其中包括了matlab中最基本的算法院程序
💻 M
字号:
%function lightpoint=beam(l)
function lightpoint=beam(l)
step=0.5;
lightpoint=[];nlp=0;
z0=0;
while z0<=21.6
    x0=-sqrt(60*z0);
    while x0<=sqrt(60*z0)
        y0=sqrt(60*z0-x0^2)
        b=-l/2;
        while b<=l/2
            [x,y]=pannel(x0,y0,z0,b);
            nlp=nlp+1;
            lightpoint(nlp,1:2)=[x,y];
            b=b+step;
        end
        y0=-sqrt(60*z0-x0^2)
        b=-l/2;
        while b<=l/2
            [x,y]=pannel(x0,y0,z0,b);
            nlp=nlp+1;
            lightpoint(nlp,1:2)=[x,y];
            b=b+step;
        end
        x0=x0+step;
    end
    z0=z0+step;
end

⌨️ 快捷键说明

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