Thread Subject: discrete-time signal

Subject: discrete-time signal

From: huda nawaf

Date: 20 Mar, 2010 12:29:05

Message: 1 of 8

hi,
please , can anybody help me to write code and plot this signal?
Define the discrete-time signal x(n) = n u(n) in a vector in the range 0 ≤ n ≤ 10 and plot the signal.

thanks in advance

Subject: discrete-time signal

From: Rune Allnor

Date: 20 Mar, 2010 12:40:28

Message: 2 of 8

On 20 Mar, 13:29, "huda nawaf" <halmam...@yahoo.com> wrote:
> hi,
> please , can anybody help me to write code and plot this signal?
> Define the discrete-time signal x(n) = n u(n) in a vector in the range 0 ≤ n ≤ 10 and plot the signal.
>
> thanks in advance

doc plot
doc stem

Rune

Subject: discrete-time signal

From: RIKA fazi

Date: 20 Mar, 2010 13:03:04

Message: 3 of 8

Rune Allnor <allnor@tele.ntnu.no> wrote in message <50582939-bbdb-40e2-a07a-2e6e0a4053d2@t23g2000yqt.googlegroups.com>...
> On 20 Mar, 13:29, "huda nawaf" <halmam...@yahoo.com> wrote:
> > hi,
> > please , can anybody help me to write code and plot this signal?
> > Define the discrete-time signal x(n) = n u(n) in a vector in the range 0 ≤ n ≤ 10 and plot the signal.
> >
> > thanks in advance
>
> doc plot
> doc stem
>
> Rune
if you signal is step unity we can define it by u=ones(1,10)
n=[1 :10]
u=ones(1,10)
for n=1:10
uu(n)=n*u(n)
end
size(uu)
stem(uu)

Subject: discrete-time signal

From: huda nawaf

Date: 20 Mar, 2010 13:08:03

Message: 4 of 8

Rune Allnor <allnor@tele.ntnu.no> wrote in message <50582939-bbdb-40e2-a07a-2e6e0a4053d2@t23g2000yqt.googlegroups.com>...
> On 20 Mar, 13:29, "huda nawaf" <halmam...@yahoo.com> wrote:
> > hi,
> > please , can anybody help me to write code and plot this signal?
> > Define the discrete-time signal x(n) = n u(n) in a vector in the range 0 ≤ n ≤ 10 and plot the signal.
> >
> > thanks in advance
>
> doc plot
> doc stem
>
> Rune

thanks, are you meaning , after I have got x , just plot(x)?

Subject: discrete-time signal

From: huda nawaf

Date: 21 Mar, 2010 21:50:07

Message: 5 of 8

"RIKA fazi" <fazirika@yahoo.fr> wrote in message <ho2h28$knj$1@fred.mathworks.com>...
> Rune Allnor <allnor@tele.ntnu.no> wrote in message <50582939-bbdb-40e2-a07a-2e6e0a4053d2@t23g2000yqt.googlegroups.com>...
> > On 20 Mar, 13:29, "huda nawaf" <halmam...@yahoo.com> wrote:
> > > hi,
> > > please , can anybody help me to write code and plot this signal?
> > > Define the discrete-time signal x(n) = n u(n) in a vector in the range 0 ≤ n ≤ 10 and plot the signal.
> > >
> > > thanks in advance
> >
> > doc plot
> > doc stem
> >
> > Rune
> if you signal is step unity we can define it by u=ones(1,10)
> n=[1 :10]
> u=ones(1,10)
> for n=1:10
> uu(n)=n*u(n)
> end
> size(uu)
> stem(uu)
thank you very much , but, i think that unit step be 1 from any value =>0.

Subject: discrete-time signal

From: huda nawaf

Date: 21 Mar, 2010 22:08:03

Message: 6 of 8

"RIKA fazi" <fazirika@yahoo.fr> wrote in message <ho2h28$knj$1@fred.mathworks.com>...
> Rune Allnor <allnor@tele.ntnu.no> wrote in message <50582939-bbdb-40e2-a07a-2e6e0a4053d2@t23g2000yqt.googlegroups.com>...
> > On 20 Mar, 13:29, "huda nawaf" <halmam...@yahoo.com> wrote:
> > > hi,
> > > please , can anybody help me to write code and plot this signal?
> > > Define the discrete-time signal x(n) = n u(n) in a vector in the range 0 ≤ n ≤ 10 and plot the signal.
> > >
> > > thanks in advance
> >
> > doc plot
> > doc stem
> >
> > Rune
> if you signal is step unity we can define it by u=ones(1,10)
> n=[1 :10]
> u=ones(1,10)
> for n=1:10
> uu(n)=n*u(n)
> end
> size(uu)
> stem(uu)

please friend, can you help too to resolve this question?

Write a MATLAB program to sketch the following discrete-time signals in the time range of –10 ≤ n ≤ 10. label all the graph axes clearly. If the sequence is complex, plot the magnitude and angle separately.
i. x(n) = u(n) – u(n – 3)
ii. x(n) = sin(πn/3) u(n)
iii. x(n) = 0.5n ejπn/2.
thank you very much

Subject: discrete-time signal

From: Wayne King

Date: 21 Mar, 2010 22:17:02

Message: 7 of 8

"huda nawaf" <halmamory@yahoo.com> wrote in message <ho65c3$gv9$1@fred.mathworks.com>...
> "RIKA fazi" <fazirika@yahoo.fr> wrote in message <ho2h28$knj$1@fred.mathworks.com>...
> > Rune Allnor <allnor@tele.ntnu.no> wrote in message <50582939-bbdb-40e2-a07a-2e6e0a4053d2@t23g2000yqt.googlegroups.com>...
> > > On 20 Mar, 13:29, "huda nawaf" <halmam...@yahoo.com> wrote:
> > > > hi,
> > > > please , can anybody help me to write code and plot this signal?
> > > > Define the discrete-time signal x(n) = n u(n) in a vector in the range 0 ≤ n ≤ 10 and plot the signal.
> > > >
> > > > thanks in advance
> > >
> > > doc plot
> > > doc stem
> > >
> > > Rune
> > if you signal is step unity we can define it by u=ones(1,10)
> > n=[1 :10]
> > u=ones(1,10)
> > for n=1:10
> > uu(n)=n*u(n)
> > end
> > size(uu)
> > stem(uu)
>
> please friend, can you help too to resolve this question?
>
> Write a MATLAB program to sketch the following discrete-time signals in the time range of –10 ≤ n ≤ 10. label all the graph axes clearly. If the sequence is complex, plot the magnitude and angle separately.
> i. x(n) = u(n) – u(n – 3)
> ii. x(n) = sin(πn/3) u(n)
> iii. x(n) = 0.5n ejπn/2.
> thank you very much

Huda, These are obvious homework problems. People generally do not just give people answers to their homework problems. Rune tried to politely make that point by just telling you to read the documentation. These are pretty simple operations in MATLAB if you would spend some time reading the documentation.

Wayne

Subject: discrete-time signal

From: Walter Roberson

Date: 21 Mar, 2010 23:09:05

Message: 8 of 8

huda nawaf wrote:

> please friend, can you help too to resolve this question?
>
> Write a MATLAB program to sketch the following discrete-time signals in
> the time range of –10 ≤ n ≤ 10. label all the graph
> axes clearly. If the sequence is complex, plot the magnitude and angle
> separately.
> i. x(n) = u(n) – u(n – 3)
> ii. x(n) = sin(πn/3) u(n)
> iii. x(n) = 0.5n ejπn/2.
> thank you very much

You might find the following thread from a couple of weeks ago to have
some useful ideas:

http://groups.google.ca/group/comp.soft-sys.matlab/browse_thread/thread/5bb8146b3df8c2aa/ca5a426685029efb

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com