I need a power function for a boolean matrix.

6 ビュー (過去 30 日間)
niyazeli abdukerim
niyazeli abdukerim 2017 年 2 月 27 日
回答済み: Walter Roberson 2017 年 2 月 27 日
I need a power function for a boolean matrix.For example, boolean matrix
A = 0 1 0 1 0 0
0 0 0 0 1 0
0 1 0 0 0 0
1 1 0 0 0 0
0 0 0 1 0 1
0 0 0 0 0 0
And I need to calculate second power of A. Does matlab have such a function?

回答 (2 件)

Stephen23
Stephen23 2017 年 2 月 27 日
>> A ^ 2
ans =
1 1 0 0 1 0
0 0 0 1 0 1
0 0 0 0 1 0
0 1 0 1 1 0
1 1 0 0 0 0
0 0 0 0 0 0

Walter Roberson
Walter Roberson 2017 年 2 月 27 日

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by