clear all; close all;
file = '实验数据记录(1).xlsx';
data0 = readtable(file);
%% 参数
g = 9.8;
density = 1;
list_x1 = 2 * [0 0.0625 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.0575 0.075];
list_x2 = [0 0.0625 0.12 0.1775 0.235 0.2925 0.35 0.4075 0.465 0.5225 0.58 0.6375 0.695 0.7525 0.81 0.8675 0.925 ];
list_alpha = [0, 4, 8, 12, 15, 18];
%% 数据导入
data = []; %原始数据
for i = 1:12
data = [data;read_data(i, data0)];
end
data = table2array(data);
%% 计算
alpha = 0;
v = 20;
var = [];
pressure_data = []; % 存储压强数据
for i = list_alpha
p = get_p(i, v, data);
p = 2 * density * g * p /(0.5*v^2); % 压强系数
yt = sum(p .* list_x1); % 法向力系数
y = yt * cos(i * pi / 180); % 升力系数
x = yt * sin(i * pi / 180); % 阻力系数
var = [var; [yt, y, x]];
pressure_data = [pressure_data; p]; % 存储每个攻角下的压强系数
e
标签:攻角下,系数,list,0.0575,matlab,var,data,yt
From: https://blog.csdn.net/huanghm88/article/details/144175326