How to make the pressure contours colorbar concentration the same for all values
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Seelan Kumar
le 3 Juin 2022
Réponse apportée : Seelan Kumar
le 3 Juin 2022
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 commentaires
Réponse acceptée
Walter Roberson
le 3 Juin 2022
use caxis() to set the color settings to absolute values.
2 commentaires
Plus de réponses (2)
Voir également
Catégories
En savoir plus sur Contour Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
