x=0:0.0001:0.02; %%201的离散度
L=0.02; %%L长自己定
Re=0.015 %%自己定
y=Re.*sqrt(1./(1-7./16*(((1-(x./L).^2).^2)./((1+1/3*(x./L).^2).^3)))) %%7./16是(Re/R0)²自己根据条件算
plot(x,y)
fid=fopen('C:\Users\Sean\Desktop\2021down\QDworkd\new.txt','a')
%%'C:\Users\Sean\Desktop\2021down\QDworkd\new.txt'是文件位置自己定
for i=1:200
fprintf(fid,"%f,%f,%d\r\n",x(i),y(i),0);
end
写完以后再txt文件打开第一行输入200 1
然后重命名改文件名扩展名为.dat
完成