フィルターのクリア

How to combine two matrix based on position and find the corresponding element?

3 ビュー (過去 30 日間)
ASHA PON
ASHA PON 2022 年 4 月 26 日
コメント済み: ASHA PON 2022 年 4 月 28 日
I am having two matrix. one matrix element represent the position whereas other matrix contine the elements. Now i have to merge these two matrix based on position and to find corresponding element.
for example:
a=[ 5 6 3 7]
b=[011 101 010 001 100 110 111]
expected output:
c=[100 110 010 111]
i need to apply this problem to a larger n*m matrix.

採用された回答

the cyclist
the cyclist 2022 年 4 月 26 日
  3 件のコメント
ASHA PON
ASHA PON 2022 年 4 月 28 日
Thank you for your reply. But while applying this condition, only one bit from binary element is displayed as output.
otained output:
0
1
1
1
expected output:
010
100
110
111
ASHA PON
ASHA PON 2022 年 4 月 28 日
Thank you I got the correct resutlt.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by