Info

この質問は閉じられています。 編集または回答するには再度開いてください。

i need to transfer matrix coordinates in a specific order

1 回表示 (過去 30 日間)
Kobi
Kobi 2013 年 12 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
hi i have a matrix and i need to take all the coordinates like this:
new_columns=old_rows+old_columns/2 and new_rows=old_rows-old_columns/2
i tried using meshgrid like this but i'm stuck i can't figure out how to apply this "meshgrid" operation from the old matrix to the new matrix
this is my code so far:
N=5;
s=-N:N;
s_0=-N:N;
[S_0,S]=meshgrid(s_0,s);
NEW_COL=S-S_0./2;
NEW_COL=fix(NEW_COL);
NEW_ROW=S+S_0./2;
NEW_ROW=fix(NEW_ROW);

回答 (1 件)

Roger Stafford
Roger Stafford 2013 年 12 月 18 日
It's not clear to me what form you wish the two new matrices to have. The following is just my guess. Perhaps if you give concrete example of what you want, we wouldn't have to guess.
new_columns = (A.'+A)/2;
new_rows = (A-A.')/2;

この質問は閉じられています。

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by