end
end
%绘图
figure(1)
plot(sym1(1,:),sym1(2,:),sym2(1,:),sym2(2,:))
figure(2)
plot(sym1(1,:),sym1(2,:),sym2(1,:),sym2(2,:),avg1(1,:),avg1(2,:),avg2(1,:),avg2(2,:));
legend('sym1','sym2','avg1','avg2');
hold on
plot(sym1(1,:),sym2(2,:)./sym1(2,:),avg1(1,:),avg2(2,:)./avg1(2,:));
legend('symrate','avgrate');
fid=fopen(['tec' name2],'w');
fprintf(fid,'TITLE = "heat transfer coefficient" \nVARIABLES =
"x/d", "yta or rate" \nZONE T="sym", I=%d,
F=POINT\n',length(sym2));
fprintf(fid,'.6f .6f',sym2);
fprintf(fid,'ZONE T="avg", I=%d, F=POINT\n',length(avg2));
fprintf(fid,'.6f .6f',avg2);
fclose(fid)
%用tecplot格式输出
fid=fopen('tecpost','w');
fprintf(fid,'TITLE = "heat transfer coefficient" \nVARIABLES =
"x/d", "yta or rate" \nZONE T="sym", I=%d,
F=POINT\n',length(sym1));
fprintf(fid,'.6f .6f',sym1);
fprintf(fid,'ZONE T="avg", I=%d, F=POINT\n',length(avg1));
fprintf(fid,'.6f .6f',avg1);
fclose(fid)