フィルターのクリア

How to divide different rows of a matrix to different numbers?

1 回表示 (過去 30 日間)
Mnr
Mnr 2014 年 3 月 29 日
コメント済み: Mnr 2014 年 3 月 29 日
Hello all,
I have a mx2 matrix with its different rows are different integer multiples of (1,0), (-1,0), (0,1), (0,-1), (1,1), (-1,1), (1,-1). For example, my matrix can be something like: [4 4; 0 3; 2 0; -5 5.....]
I would like to divide each row by a proper integer such that I can extract (1,0), (-1,0), (0,1), (0,-1), (1,1), (-1,1), (1,-1). Can anybody help me please? Thanks.
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 3 月 29 日
To make your question clear, post a short example with the expected result

サインインしてコメントする。

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 3 月 29 日
編集済み: Azzi Abdelmalek 2014 年 3 月 29 日
Maybe you want
A=[4 4; 0 3; 2 0; -5 5]
out=sign(A)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by