How to make the pressure contours colorbar concentration the same for all values
2 次查看(过去 30 天)
显示 更早的评论
How to make the Cp reference colour the same for this coding with different Cp values? Because when I run this coding for the other half of the tail, the Cp colour at 0.008 is in orange colour. How to make the Cp contour constant?

% Make x-y mesh grid
x = [-4.2195;
-5.7195;
-7.2195;
-8.7195;
-2.7195;
-4.2195;
-5.7195;
-7.2195;
-8.7195;
-1.2195;
-2.7195;
-4.2195;
-5.7195;
-7.2195;
-8.7195];
y = [6.3;
6.3;
6.3;
6.3;
4;
4;
4;
4;
4;
1.7;
1.7;
1.7;
1.7;
1.7;
1.7];
pressure = [0.007422;
0.005551;
0.003788;
0.003951;
0.008568;
0.004381;
0.003754;
0.003587;
0.003588;
0.006594;
0.003985;
0.003538;
0.00387;
0.003596;
0.003762];
[xq,yq] = meshgrid(...
linspace(min(x),max(x),170),...
linspace(min(y),max(y),170));
% Interpolate using "griddata" function
pq = griddata(x,y,pressure,xq,yq,'cubic');
% Visualize the result
figure
%surfc(xq,yq,pq)
surfc(xq,yq,pq, 'EdgeColor','none ')
xlabel('x','FontSize',16)
ylabel('y','FontSize',16)
c = colorbar;
c.Label.String = 'Cp';
c.Label.FontSize = 16;
c.Limits = [0 0.012]
0 个评论
采纳的回答
更多回答(2 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
