How can i solve "Subscript indices must either be real positive integers or logicals." error.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello. I am trying to demodulate a signal.But i get Subscript indices must either be real positive integers or logicals error.I try debugging and i think the problem caused by s(t) part but i can not fix it.Can you help me to fix it? Many Thanks.
Ac=5;
fc=250;
fs=600;
Ta=1/fc;
t=1:0.01:10;
ym=Ac*sin(2*pi*fc*t);
k=0.85;
figure
plot(t,ym);
A = zeros(1,5995);
s(t)=Ac*(1+k*ym).*cos(2*pi*fc*t);
x = demod(s,fc,fs,'fm','centered');
figure
plot(x);
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!