2 Attachment(s)

Signal in Matlab? How to make it?

Hello,

PLEASE, could you help me to solve my problem with Matlab? I would like to make a graph of a function which will generate something like SIGNAL: for the first 5 seconds there will be a constant function y = 0, then for example for 10 seconds there will be a goniometric function (sinx) and for the last 5 seconds there will be again a constant function y = 0. You can see something like this in the attachments. Thanks in advance!

Yours

Peter

Re: Signal in Matlab? How to make it?

This might be helpful

Heaviside step function - MATLAB

Think of using

heaviside(something) to be zero for time < 5 and one for time > 5

times

sin(somethingelse) to have one cycle for 5 <time< 10

times

(1-heaviside(somethingelseelse)) to be one for time < 10 and zero for time > 10