Thread Subject: Trapezoid Plot (X-Y) for AM on Matlab

Subject: Trapezoid Plot (X-Y) for AM on Matlab

From: Simon Luk

Date: 17 Apr, 2009 02:15:05

Message: 1 of 4

Hi,

I would like to perform an X-Y plot of an AM signal
X -> message signal
Y -> carrier signal
I think people whos studied communication would know what I exactly want. (i.e triangle when its 100% modulated, trapezoid when its under modulated, double triangle when its over modulated)

I've done the following code, but its not working...

clear all;
close all;
fs = 5000e3;
Ts = 1/fs;
N = 10000;
T0 = N*Ts;
t = 0:Ts:T0-Ts;

A = 1;
B = 1;
m = 1.5;
u = 1000*2*pi;
w = 100000*2*pi;

AM1 = A*(1+m*cos(u*t));
AM2 = B*cos(w*t);

AM = AM1.*AM2;

plot(AM1,AM2);
title('Amplitude Modulation X-Y');



Thanks in advance,
Regards,
Simon

Subject: Trapezoid Plot (X-Y) for AM on Matlab

From: Simon Luk

Date: 19 Apr, 2009 04:50:05

Message: 2 of 4

Anyone can help?

Subject: Trapezoid Plot (X-Y) for AM on Matlab

From: TideMan

Date: 19 Apr, 2009 05:33:15

Message: 3 of 4

On Apr 19, 4:50=A0pm, "Simon Luk"
<simon....@student.uts.edu.au.REMOVETHIS> wrote:
> Anyone can help?

I'm afraid my crystal ball is a bit cloudy today.
You will have to tell us in what way it is "not working".

Does the code run correctly?
If not, what is the error message.
If it runs correctly, describe what's wrong with the result.

Subject: Trapezoid Plot (X-Y) for AM on Matlab

From: Simon Luk

Date: 19 Apr, 2009 12:15:04

Message: 4 of 4

Hi Tideman,

thanks for replying,

your question triggered me to think and i have found what was wrong with my code.

the plot function should be

plot(AM1,AM);
where x = message signal
          y = AM signal




Thanks again Tideman :)

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
amplitude Simon Luk 16 Apr, 2009 22:15:07
modulation Simon Luk 16 Apr, 2009 22:15:07
am Simon Luk 16 Apr, 2009 22:15:07
trapezoid Simon Luk 16 Apr, 2009 22:15:07
xy Simon Luk 16 Apr, 2009 22:15:07
plot Simon Luk 16 Apr, 2009 22:15:07
rssFeed for this Thread

Contact us at files@mathworks.com