Message Boards Message Boards

Use Quiet[Plot[Piecewise[... to suppress the errors?

Posted 7 years ago

Consider the following code:

Manipulate[
     Quiet[Plot[
       Piecewise[{{Subscript[V, 0]*a, 
          x < (a/2)}, {Subscript[V, 
           0]*((a/2) + (2*Abs[x - ((3*a)/4)])), (a/2) <= x <= 
           a}}], {x, -a, a}]], {a, 0, 5}, {Subscript[V, 0], 0, 5}]

When I evaluate this it does'nt suppress the errors, does anyone have a solution to this?

POSTED BY: Felix Springer

Platform? Version?

Note that a has to be positive (i.e. larger than 0). Plots works fine in my case on a fresh kernel V11.1.1. Note as well that Quiet does not suppress errors, it only suppresses messages! Suppressing errors needs to be done by the user...

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract