필터 지우기
필터 지우기

number of samples in the signal

조회 수: 3 (최근 30일)
Kutru biladi
Kutru biladi 2015년 7월 22일
댓글: Star Strider 2015년 7월 22일
Hi all, i am new in matlab. i want to implement a equation.
ts = 0.01;
t = 0:ts:10;
fs = 1/ts;
fc = 50;
S = cos(2*pi*fc*t);
now i want to implement a equation with t[n]. Here what shoud i take as number of samples.
S2 = sin(2*pi*fc*t[n] + phi(t[n]));
what shoud i put here as t[n];
  댓글 수: 2
dpb
dpb 2015년 7월 22일
In Matlab, one uses the facility to treat values as vectors (or matrices or arrays) instead of dealing with individual element-at-a-time paradigms such as C.
Just write
S2 = sin(2*pi*fc*t + phi);
excepting you need a defining formula for phi that you've not supplied.
Star Strider
Star Strider 2015년 7월 22일
Also, in MATLAB, square brackets [] are not used for subscript references. See the documentation on Special Characters for details.

댓글을 달려면 로그인하십시오.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by