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