modulating the meesage signal

1 view (last 30 days)
yofiandi yosmansyah
yofiandi yosmansyah on 10 Jan 2013
hi guys i have a question which is how to write the matlab code for a messages signal
m(t) =
1 when 0=<t=<0.05
-9 when 0.05=<t=<0.1
else is 0
pls help me and thanks
  15 Comments
yofiandi yosmansyah
yofiandi yosmansyah on 11 Jan 2013
thats it is..thanks bro for the help..i really appreciate it..btw how to plot the amplitude spectra ya??

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 11 Jan 2013
Define your vector t of times. Then,
m = zeros(size(t));
m(t > 0 & t < 0.05) = 1;
m(t >= 0.05 & t <= 0.01) = -9;
Note this would be only one pulse.

Categories

Find more on MATLAB 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!