Transfer Geometry to a matrix

Hi, I have a Geometry as : G =
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 0 0 0 0 0 0 0 0 0
-1 0 0 0 0 0 0 0 0 0
-1 0 0 0 0 0 0 0 0 5,
and I'd like to transfer the 26 x 0 coordinates to a 26x2 matrix (X), please.

 Accepted Answer

[r, c] = find(X == 0);
coords = [r, c];

1 Comment

Aswas
Aswas on 13 May 2016
Edited: Aswas on 13 May 2016
Walter,
Thanks, all sweet.

Sign in to comment.

More Answers (0)

Categories

Find more on Computational Geometry in Help Center and File Exchange

Tags

Asked:

on 13 May 2016

Edited:

on 13 May 2016

Community Treasure Hunt

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

Start Hunting!