Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'piecewise function' topicStudent Support Forum > General > Archives > "piecewise function"

Next Comment >Help | Reply To Topic
Author Comment/Response
07/23/10 09:38am

I want a piecewise function as follows.

rmax[s_] :=
Piecewise[{{2.5, Abs[s] <= 1}, {Min[2.5, 2/Sqrt[s^2 - 1]],
Abs[s] > 1}}]

The second value makes sense whenever the condition is satisfied, but I still get error messages when I try to plot it because the Min function gets imaginary numbers when s<1.

the error messages are
Min::nord: Invalid comparison with 1.25+2.9729790718136506 i attempted. etc

URL: ,

Subject (listing for 'piecewise function')
Author Date Posted
piecewise function kyle 07/23/10 09:38am
Re: piecewise function yehuda ben-s... 08/01/10 1:07pm
Next Comment >Help | Reply To Topic