"Wayne King" <wmkingty@gmail.com> wrote in message <hoas3b$g6o$1@fred.mathworks.com>...
> "huda nawaf" <halmamory@yahoo.com> wrote in message <hoarar$31k$1@fred.mathworks.com>...
> > hi,
> > how i can plot the signal if the coordinate is negative . i.e for ex. the point x(1,1)
> > where matlab reject the negative index.
> > thanks in advance
>
> Huda, Matlab will allow you plot negative numbers. It doesn't allow you to address elements of a vector (or matrix) with negative numbers. So
>
> x = linspace(2,2,100);
> y=cos(2*pi*5*x);
> plot(x,y)
> % Note the negative numbers on both the x and y axes
>
> is fine. But you cannot ask something like x(2)
>
> Wayne
thank you very much .
when is asked me to plot this signal , in question there is an one wave of sine, it should be get the same , but i don't how should determine the range of t(in question didnt give t , and are there relation between t and T?
v(t)=v0 sin(2*pi*t/T)
the code , I wrote it:
c=1;T=10
for t=10:0.1:10
v(c)=v0 sin(2*pi*t/T)
c=c+1
end
plot(v)
many thanks
