Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'square wave/conditional function definition' topicStudent Support Forum > General > Archives > "square wave/conditional function definition"

Next Comment >Help | Reply To Topic
Author Comment/Response
Doug
01/29/99 4:01pm

Does anyone have a good way to define a square wave in Mathmatica?

I thought perhaps I could use the ''manual'' method and define the wave conditionally, like:

1 for 0<x<=1
y(x)= -1 for 1<x<=2
1 for 2<x<=3

but I couldn't figure out how to do this or just didn't know where to look.
Even so this is not the best solution, as I would rather define it with a
function rather than ''manually'' as above. And I have needed to define functions conditionally in other cases, so any help would be appreciated.
-dv

Thanks in advance.
-dv

URL: ,

Subject (listing for 'square wave/conditional function definition')
Author Date Posted
square wave/conditional function definition Doug 01/29/99 4:01pm
Re: square wave/conditional function definition Forum Modera... 02/06/99 12:38pm
Re: square wave/conditional function definition dave belisle 02/09/99 1:12pm
Next Comment >Help | Reply To Topic