Not enough input arguments

조회 수: 1 (최근 30일)
kiroro00
kiroro00 2021년 11월 21일
댓글: Stephen23 2021년 11월 21일
Hi, I've been trying to do a coding for FM Modulating Signal but when using the code below, I got a "not enough input arguments" error. Would really appreciate it if anybody could help. Thank you!
fs=100;
ts=1/fs;
fd=25;
t=(0:ts:0.5-ts)';
x=sin(2*pi*4*t);
MOD=comm.FMModulator('SampleRate',fs,'FrequencyDeviation',fd);
ym=step(MOD,x);
subplot(2,1,1);
plot(t,[x real (ym)]);
xlabel ('Time')
ylabel ('Amplitude')
title ('Modulated Signal')
the error :
Error using real
Not enough input arguments.
Error in lab4dm (line 11)
plot(t,[x real (ym)]);

채택된 답변

the cyclist
the cyclist 2021년 11월 21일
You need
real(ym)
instead of
real (ym)
  댓글 수: 2
kiroro00
kiroro00 2021년 11월 21일
Didn't realize that the space could cause errors. Got the output that I expected, thanks!
Stephen23
Stephen23 2021년 11월 21일
"Didn't realize that the space could cause errors"
Because it means that you are using command syntax:

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modulation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by