Is it possible to make a meshgrid wraparound
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Stacy Genovese
le 8 Mar 2022
Commenté : Stacy Genovese
le 8 Mar 2022
Is there a way to make a mesgrid and have the edges wraparound?
Thanks
1 commentaire
Réponse acceptée
Walter Roberson
le 8 Mar 2022
x = linspace(0,1,7);
y = linspace(0, 2*pi, 5);
[X, Y] = meshgrid([x, x(1)], [y, y(1)])
Note however, that functions that require meshgrid "plaid" inputs often require that the inputs be sorted, and may reject wrap-around.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical 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!