how to flip mirror contour plot horizontally (to flip about 180 degrees)

3 vues (au cours des 30 derniers jours)
Hello everyone, please i have this code which i used the attached files to generated the mirror contour plot as in the figure. Please how can i flip the two contours horizontally? in other words both contours to flip to 180 degrees horizontal.
figure
[C,h] = contour(R,Z,psi,9,'linewidth',1.9)
hold on
[C,h] = contour(-R,Z,psi,9,'linewidth',1.9)

Réponse acceptée

Ameer Hamza
Ameer Hamza le 2 Déc 2020
Are you looking for something like this
psi = readmatrix('psi_all.txt');
Z = readmatrix('Z_all.txt');
R = readmatrix('R_all.txt');
figure
[C,h] = contour(R,Z,flipud(psi),9,'linewidth',1.9)
hold on
[C,h] = contour(-R,Z,flipud(psi),9,'linewidth',1.9)
  2 commentaires
Abba Alhaji Bala
Abba Alhaji Bala le 2 Déc 2020
that is exactly what i want, thanks
Ameer Hamza
Ameer Hamza le 2 Déc 2020
I am glad to be of help!

Connectez-vous pour commenter.

Plus de réponses (0)

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!

Translated by