From: huda nawaf on
"RIKA fazi" <fazirika(a)yahoo.fr> wrote in message <ho2h28$knj$1(a)fred.mathworks.com>...
> Rune Allnor <allnor(a)tele.ntnu.no> wrote in message <50582939-bbdb-40e2-a07a-2e6e0a4053d2(a)t23g2000yqt.googlegroups.com>...
> > On 20 Mar, 13:29, "huda nawaf" <halmam...(a)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 &#8804; n &#8804; 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 &#8211;10 &#8804; n &#8804; 10. label all the graph axes clearly. If the sequence is complex, plot the magnitude and angle separately.
i. x(n) = u(n) &#8211; u(n &#8211; 3)
ii. x(n) = sin(&#960;n/3) u(n)
iii. x(n) = 0.5n ej&#960;n/2.
thank you very much
From: Wayne King on
"huda nawaf" <halmamory(a)yahoo.com> wrote in message <ho65c3$gv9$1(a)fred.mathworks.com>...
> "RIKA fazi" <fazirika(a)yahoo.fr> wrote in message <ho2h28$knj$1(a)fred.mathworks.com>...
> > Rune Allnor <allnor(a)tele.ntnu.no> wrote in message <50582939-bbdb-40e2-a07a-2e6e0a4053d2(a)t23g2000yqt.googlegroups.com>...
> > > On 20 Mar, 13:29, "huda nawaf" <halmam...(a)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 &#8804; n &#8804; 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 &#8211;10 &#8804; n &#8804; 10. label all the graph axes clearly. If the sequence is complex, plot the magnitude and angle separately.
> i. x(n) = u(n) &#8211; u(n &#8211; 3)
> ii. x(n) = sin(&#960;n/3) u(n)
> iii. x(n) = 0.5n ej&#960;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
From: Walter Roberson on
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 &#8211;10 &#8804; n &#8804; 10. label all the graph
> axes clearly. If the sequence is complex, plot the magnitude and angle
> separately.
> i. x(n) = u(n) &#8211; u(n &#8211; 3)
> ii. x(n) = sin(&#960;n/3) u(n)
> iii. x(n) = 0.5n ej&#960;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