how to creat this rectangular signal?
2 ビュー (過去 30 日間)
古いコメントを表示
X=[1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 0 0 0]
Y=[1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1]
X and Y these are rectangular signal vectors
I would like a transformation x (t) to y (t)?![48099895_1457061161094299_7270906206472896512_n.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/201704/48099895_1457061161094299_7270906206472896512_n.png)
![48099895_1457061161094299_7270906206472896512_n.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/201704/48099895_1457061161094299_7270906206472896512_n.png)
6 件のコメント
採用された回答
Jan
2019 年 1 月 28 日
x = [1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 0 0 0];
y = ones(size(x));
y(strfind(x, [0,1])) = -1;
y = cumprod(y);
y(y == -1) = 0;
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Signal Generation and Preprocessing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!