How can i solve "Subscript indices must either be real positive integers or logicals." error.

1 Ansicht (letzte 30 Tage)
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);

Akzeptierte Antwort

Torsten
Torsten am 18 Mai 2017
s=Ac*(1+k*ym).*cos(2*pi*fc*t);
Best wishes
Torsten.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by