please help me !!!
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
fs=8e3; % tần số lấy mẫu
step=1/fs; % chu kỳ lấy mẫu
A=87.6; % hằng số nén luật A
t=0:step:1; %vecto thời gian- quá trình lấy mẫu
Pa=-14:28/255:14; % vecto các mức lượng tử hóa, biên độ lớn nhất và nhỏ nhất có thể của s(t) là 14 và -14
s(t)=(1*cos(2*pi*100*t))+(2*cos(2*pi*200*t+pi/2))+(3*cos(2*pi*200*t+pi/4)); % quá trình lấy mẫu
Array indices must be positive integers or logical values.
Error in untitled2 (line 8)
s(t)=(1*cos(2*pi*100*t))+(2*cos(2*pi*200*t+pi/2))+(3*cos(2*pi*200*t+pi/4)); % quá trình lấy mẫu
0 Commenti
Risposte (1)
DGM
il 10 Mag 2022
As mentioned in the comment you left,
t is not a nonzero integer, so you can't use it as an index on the LHS of the assignment.
s = cos(2*pi*100*t) + 2*cos(2*pi*200*t+pi/2) + 3*cos(2*pi*200*t+pi/4); % quá trình lấy mẫu
3 Commenti
Vedere anche
Categorie
Scopri di più su Subplots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!