# Questions tagged [piecewise]

Questions about the Piecewise function, which is represented by different expressions for different ranges of values of its independent variable.

315 questions
Filter by
Sorted by
Tagged with
70 views

### Integrating piecewise function in two variables

I want to find (and plot) the integral of a 'smooth' version of the Möbius function MoebiusMu[x]: ...
349 views

### Continuous non-piecewise equivalent of smoothstep function?

I have a smooth step function given by the piecewise function ...
87 views

### Slow Plotting of a Piecewise Function

I have stumbled upon an issue that seems very weird to me. I have two Piecewise functions that describe exactly the same curve. The only difference between them is that the first function has two ...
90 views

### Convert a piecewise definition of a single impulse into an impulse train

NOTE: See update at end of question I have a function smoothstep (based on the derivative of a smoothstep function) that gives a single impulse as follows: ...
491 views

### Solving Stefan's solidification problem - for the case of 3 regions

This question heavily related to this question, where the case of two PDE's are solved along with a zipping condition that is a function of time. Using the link in the code I have solved this set of ...
183 views

### How to change colors of 3D parametric plot

I have a 3D iterative plot, where each iteration (1,2,3) is represented by equation of piecewise linear function. I am trying to change the colors of plot, to get for every iteration (piecewise ...
95 views

### How to plot 3D discontinuous iterative plot?

I am having troubles with plotting this set of data triples={{0, 1, 1}, {9/50, 4/5, 1}}, {{9/50, 4/5, 1}, {3/8, 4/5, 1}}, {{3/8, 58333/100000, 1}, {3/4, 16667/100000, 1}}, {{3/4, 0, 1}, {1, 0, ...
82 views

### how to get coordinates from a plot of piecewise function?

I am having troubles with finding points from a plot. I have a piecewise linear function given by following inequalities. These inequalities I got from previous calculations where I split two ...
50 views

### How to extract envelope for piecewise defined function? [duplicate]

I have a plot generated from an ugly and complex set of piece-wise functions. I'm looking to extract the envelope function from this data set. I've tried a lot of suggestions in other threads, but ...
63 views

### Using Piecewise to plot a defined function [closed]

I'm trying to Plot this function: Between the interval -0.2 < t < 0.1 but it doesn't work. All i get is a blank graph between my intervals. If you could help me out I'd greatly appreciate it. ...
40 views

### How to read information from a piecewise function?

I defined a periodic piece wise function y[x_] with some discrete steps with Piecewise command and two lists ...
571 views

### Solve piecewise function

I have two piecewise function ...
69 views

### Combine EvenQ and Clip to create a series of pulses

I have a function that produces a single impulse spanning the range [-1,1]: func1 = Cos[Pi*(Clip[x]/2)]^2 I want to create a ...
81 views

### Using table and piecewise function together

I am trying to define an equation set, in which the function is very similar to a square wave, but instead, it is defined piecewise at each interval. Now I need to evaluate the equation at each ...
109 views

### How to represent in a 3D graph the set of solutions to this system of inequalities?

I am studying this piecewise function: ...
311 views

### Problem with Piecewise function

I have a Piecewise function that must be non-negative. I want to replace negative part of this function with zero. my function has two summit and two valley. I want to remove this valley because in my ...
54 views

345 views

### Vertical Lines at steps of HeavsideTheta

I want to plot the following: Plot[{Sqrt[x], Sum[HeavisideTheta[x - n^2], {n, 1, Floor[x]}]}, {x, 0,50}] which looks like Is there a simple way to get this same ...
156 views

### Plotting a piecewise function in Mathematica 10.0

How to I plot the following function in one diagram: from $0$ to $\frac{\pi}{2}$ the function has to equal $\left|\sin\left(x\right)\right|$ and from $\frac{\pi}{2}$ the function \$\exp\left(-\frac{x}{...
1k views

### NIntegrate extremely piecewised functions

I often need to integrate extremely piecewised functions, like the following one (not extreme, but gives an idea): ...
535 views

### Using OddQ and EvenQ in piecewise functions: Buggy?

I was trying to evaluate a sum over a piecewise function, not unlike this example. However, my piecewise function needed to be defined differently for even and odd ...
139 views

### ElementwiseLayer with Piecewise?

I need a specific custom activation function; how can I implement it with Piecewise? This is what I've tried (using the recommendation from this question): ...