Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
i need to transfer matrix coordinates in a specific order
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Roger Stafford
el 18 de Dic. de 2013
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 comentarios
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!