How can i solve "Subscript indices must either be real positive integers or logicals." error.
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!