Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
Help in converting a function to 'heaviside' !!!

Subject: Help in converting a function to 'heaviside' !!!

From: Animesh Pandey

Date: 8 Mar, 2011 13:34:22

Message: 1 of 1

This is a numeric function
t = -1.1 : 0.01 : 5;
f = @(t) 2.*((t>=0) - (t>=1));
y = -f(t+1)+f(t-2);
plot(t, y, 'r'), xlim([-7 7]), ylim([-3 3]), grid

The signal has a period of 6 units and extends from -1 to 5 in this code.
I want to use 'syms' and represent it using 'heaviside()'.
Please help !!!!

Tags for this Thread

No tags are associated with this thread.

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.

Contact us