文件
em3d-mt/bin/RMT3d/calculate_layers.m
刘明宏 7dc03afc54 code
Signed-off-by: 刘明宏 <liuminghong@mail.sdu.edu.cn>
2025-04-29 07:11:26 +00:00

6 行
199 B
Matlab

function t=calculate_layers(n,t1,z)
%% calculate layer thicknesses given nlayers and top and bottom
exp_sum = @(x) ( x.^(n-1)-1)./(x-1)-z/t1;
f = fzero(exp_sum,[1.0001 2]);
t = t1*f.^(0:(n-2));