How to make the pressure contours colorbar concentration the same for all values

16 ビュー (過去 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]

採用された回答

Walter Roberson
Walter Roberson 2022 年 6 月 3 日
use caxis() to set the color settings to absolute values.
  2 件のコメント
Seelan Kumar
Seelan Kumar 2022 年 6 月 3 日
Sorry, can you help me to add it in my coding because I'm not sure how to do it.

サインインしてコメントする。

その他の回答 (2 件)

Seelan Kumar
Seelan Kumar 2022 年 6 月 3 日
This is the other half. But the colour shade at the Cp colorbar changes. So, I couldnt compare the pressure distribution.

Seelan Kumar
Seelan Kumar 2022 年 6 月 3 日
Thank you so much.

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by