How to create a matrix of coordinates
Mostra commenti meno recenti
I want create a matrix like this for any input, in this example input is "3".
a = (3,1) (3,2) (3,3)
(2,1) (2,2) (2,3)
(1,1) (1,2) (1,3)
But i dont know how to do
Risposta accettata
Più risposte (1)
Andrei Bobrov
il 22 Feb 2019
1 voto
[ii,jj] = ndgrid(n:-1:1,1:n);
out = cat(3,ii,jj);
1 Commento
Kenny
il 25 Feb 2019
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!