フィルターのクリア

How to select true values ?

8 ビュー (過去 30 日間)
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar 2018 年 10 月 29 日
コメント済み: madhan ravi 2018 年 10 月 29 日
I have 2 matrices and 4 conditions for it
like positive positive negative positive positive negative abd negative negative
i have converted them into indices matrix
and now it should go further when the answer is true
if true
% code
A=[-1,2,3,4,-5]
B= [-6,-7,8,9,10]
i1=A<0;i2=A>0;i3=B<0;i4=B>0;
for example in i1 and i3 how can select 1 and 1 on the same index
here -1 and -6 and the go further
  1 件のコメント
madhan ravi
madhan ravi 2018 年 10 月 29 日
whats your desired result? give an example

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

採用された回答

madhan ravi
madhan ravi 2018 年 10 月 29 日
>> A=[-1,2,3,4,-5]
B= [-6,-7,8,9,10]
i1=A<0;
i2=A>0;
i3=B<0;
i4=B>0;
AA= A(i1 & i3)
BB=B(i2 & i4)
A =
-1 2 3 4 -5
B =
-6 -7 8 9 10
AA =
-1
BB =
8 9
>>
  1 件のコメント
madhan ravi
madhan ravi 2018 年 10 月 29 日
Like the above maybe?

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 10 月 29 日

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by