Info
この質問は閉じられています。 編集または回答するには再度開いてください。
i need to transfer matrix coordinates in a specific order
1 回表示 (過去 30 日間)
古いコメントを表示
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);
0 件のコメント
回答 (1 件)
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;
0 件のコメント
この質問は閉じられています。
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!