Making a matrix act like a coordinate plane

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!

 Accepted Answer

x = -50:50 ;
y = -50:50 ;
[X,Y] = meshgrid(x,y) ;

1 Comment

I still had to invert the Y but thank you for the help!

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2019a

Asked:

on 30 Jun 2020

Commented:

on 30 Jun 2020

Community Treasure Hunt

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

Start Hunting!