Thread Subject: How to generate this time-domain signal in matlab...

Subject: How to generate this time-domain signal in matlab...

From: joesam

Date: 5 Feb, 2009 19:07:01

Message: 1 of 3

Plot x(t) http://i42.tinypic.com/ir0pdj.jpg

from t=-3 to 3

Subject: How to generate this time-domain signal in matlab...

From: vedenev

Date: 6 Feb, 2009 10:23:31

Message: 2 of 3

You can use switch with floor:

t=...
switch floor(t)
    case -3 % -3<=t<-2
        x=0;
    case -2 % -2<=t<-1
        x=t+3;
    case -1 % -1<=t<0
        x=1;
    case 0 % 0<=t<1
        x=1;
    case 1 % 1<=t<2
        x=-t+3;
    case 2 % 2<=t<3
        x=0;
end

-----------------------------------------
Maxim Vedenev, MATLAB Custom Programming
vedenev@ngs.ru
http://simulations.narod.ru/

Subject: How to generate this time-domain signal in matlab...

From: Steve Amphlett

Date: 6 Feb, 2009 11:01:02

Message: 3 of 3

joesam <kwei88@gmail.com> wrote in message <26629693.1233860851876.JavaMail.jakarta@nitrogen.mathforum.org>...
> Plot x(t) http://i42.tinypic.com/ir0pdj.jpg
>
> from t=-3 to 3

What have you tried so far? Folk here are very helpful for people with real problems. Real problems do not involve laziness.

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