how to generate a sequence x of length 200 samples,where the first 30 values equal 1 and the remainder have a value of 0.

 採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 9 月 27 日

0 投票

a=[ones(30,1);zeros(170,1)]

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Embedded Coder についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by