how to create this vector?

1 回表示 (過去 30 日間)
benghenia aek
benghenia aek 2019 年 1 月 30 日
編集済み: James Tursa 2019 年 1 月 30 日
i have two vectors X and Y:
X=[0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1]
Y=[3 6 5]
i want to creat vector Z
Z=[0 0 0 3 3 3 3 0 0 6 6 0 0 0 5 5 5 5]
  4 件のコメント
benghenia aek
benghenia aek 2019 年 1 月 30 日
Fangjun Jiang if you have answere to my question then give it to me please
Walter Roberson
Walter Roberson 2019 年 1 月 30 日

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

採用された回答

Andrei Bobrov
Andrei Bobrov 2019 年 1 月 30 日
X=[0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1];
Y=[3 6 5];
Y2 = [0,Y];
out = Y2(bwlabel(X) + 1);
  1 件のコメント
benghenia aek
benghenia aek 2019 年 1 月 30 日
Andrei Bobrov thank you very much for your answere

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

その他の回答 (0 件)

カテゴリ

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

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by