Making a matrix act like a coordinate plane

4 ビュー (過去 30 日間)
Sean Spencer
Sean Spencer 2020 年 6 月 30 日
コメント済み: Sean Spencer 2020 年 6 月 30 日
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!

採用された回答

KSSV
KSSV 2020 年 6 月 30 日
x = -50:50 ;
y = -50:50 ;
[X,Y] = meshgrid(x,y) ;
  1 件のコメント
Sean Spencer
Sean Spencer 2020 年 6 月 30 日
I still had to invert the Y but thank you for the help!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by