Extract coordinates from a significance matrix

1 回表示 (過去 30 日間)
Eric
Eric 2014 年 12 月 1 日
回答済み: Azzi Abdelmalek 2014 年 12 月 1 日
Hi everybody,
I've created a matrix with all the significant values from performing ttest (19x19 with 1's and 0's) and I would like to extract the coordinates (like (3,2)) for all the 1 values. And then put them into a matrix like [3,2; 4,2; ...].
Is this possible? And does anyone know how?
Best regards,
Christian

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 12 月 1 日
a=randi([0 1],19) % Example
[ii,jj]=find(a)
out=[ii jj]

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by