% 已知参数
R = 200; % mm
pb = 180; % MPa
sigma_fb = 2000; % MPa
alpha_deg = 1:1:60; % 角度范围
alpha_rad = deg2rad(alpha_deg); % 转换为弧度
% 计算公式
h_alpha = (R * pb) ./ (2 * sigma_fb .* cos(alpha_rad).^2);
h_theta = (R * pb) ./ (2 * sigma_fb) .* (2 - tan(alpha_rad).^2);
h_sum = h_alpha + h_theta;
%% 2×2 子图布局
figure('Position', [100 100 1000 800]);
% 1. h_alpha 与角度
subplot(2,2,1);
plot(alpha_deg, h_alpha, 'b-', 'LineWidth', 2);
grid on;
xlabel('\alpha (deg)', 'FontSize', 12);
ylabel('h_\alpha (mm)', 'FontSize', 12);
title('h_\alpha 与角度', 'FontSize', 14);
set(gca,'FontWeight','bold');
% 2. h_theta 与角度
subplot(2,2,2);
plot(alpha_deg, h_theta, 'r-', 'LineWidth', 2);
grid on;
xlabel('\alpha (deg)', 'FontSize', 12);
ylabel('h_\theta (mm)', 'FontSize', 12);
title('h_\theta 与角度', 'FontSize', 14);
set(gca,'FontWeight','bold');
% 3. h_alpha 和 h_theta 对比
subplot(2,2,3);
plot(alpha_deg, h_alpha, 'b-', 'LineWidth', 2); hold on;
plot(alpha_deg, h_theta, 'r--', 'LineWidth', 2);
grid on;
xlabel('\alpha (deg)', 'FontSize', 12);
ylabel('厚度 h (mm)', 'FontSize', 12);
title('h_\alpha 与 h_\theta 对比', 'FontSize', 14);
legend('h_\alpha', 'h_\theta', 'Location', 'best');
set(gca,'FontWeight','bold');
% 4. h_alpha + h_theta 与角度
subplot(2,2,4);
plot(alpha_deg, h_sum, 'm-', 'LineWidth', 2);
grid on;
xlabel('\alpha (deg)', 'FontSize', 12);
ylabel('h_\alpha + h_\theta (mm)', 'FontSize', 12);
title('总厚度 与角度', 'FontSize', 14);
set(gca,'FontWeight','bold');
sgtitle('厚度与角度关系分析', 'FontSize', 16, 'FontWeight','bold');