Effacer les filtres
Effacer les filtres

Making a matrix act like a coordinate plane

4 vues (au cours des 30 derniers jours)
Sean Spencer
Sean Spencer le 30 Juin 2020
Commenté : Sean Spencer le 30 Juin 2020
I have two square matrices and want all the cells to reflect their quadrant in the matrix
for x for y
-+ ++
-+ - -
The matrices are 100x100 and the axes are row/columns 50 and 50. All values are default 0 or positive.
m(1:50,:) = -m(1:50,:); %This only makes the top quads negative in both matrices.
Thanks!

Réponse acceptée

KSSV
KSSV le 30 Juin 2020
x = -50:50 ;
y = -50:50 ;
[X,Y] = meshgrid(x,y) ;
  1 commentaire
Sean Spencer
Sean Spencer le 30 Juin 2020
I still had to invert the Y but thank you for the help!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by