フィルターのクリア

How can I create a discrete signal that starts from 0?

4 ビュー (過去 30 日間)
Berke Gozneli
Berke Gozneli 2015 年 3 月 14 日
コメント済み: Berke Gozneli 2015 年 3 月 14 日
Hello, I have a question that is probably very simple but I still couldn't figure it out due to my quite limited MATLAB knowledge. As a part of Signal Processing course, I need to define an 8 point sequence, x[n]=1, n=0,1,2,3, and x[n]=0 for n=4,5,6,7.
I have been trying to create it by simply typing:
x=[1 1 1 1 0 0 0 0];
But it starts from 1, instead of 0. How can I correct it?

回答 (1 件)

rantunes
rantunes 2015 年 3 月 14 日
Hey,
In Matlab the vectors begin at 1. So you have to live with it and your sequence x[n] for n = 0,1,2,3,...,7, should be changed to x[n] = n = 1,2,3,...,8 in your code.
Greets
  2 件のコメント
rantunes
rantunes 2015 年 3 月 14 日
*Should be changed to x[n] for n = 1,2,3,...,8
Berke Gozneli
Berke Gozneli 2015 年 3 月 14 日
Hello, thanks for the quick response :)
So I'll need to assume my sequence starts from 1 and ends at 8 while continuing my code I guess.

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

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by